Skip to content

Commit

Permalink
feat(platform): Use iwithprefixbefore to shorten the command lines
Browse files Browse the repository at this point in the history
The command line for the ESP32 compilers is very long, and it is causing
problems with the Arduino IDE on Windows systems, which enforce a hard
32kB string limit.

This patch uses the iprefix/iwithprefixbefore options to shorten the
compiler command line by changing

	"-I{compiler.sdk.path}/include/aaa"
	"-I{compiler.sdk.path}/include/bbb"
	"-I{compiler.sdk.path}/include/ccc"
	...

to:

	-iprefix "{compiler.sdk.path}/include/"
	-iwithprefixbefore aaa
	-iwithprefixbefore bbb
	-iwithprefixbefore ccc
	...

Some targets have up to 200 paths so this can save A LOT of text.
On a sample run this patch shortened a single compile command from
28777 bytes to 10728.
  • Loading branch information
pillo79 committed Nov 19, 2024
1 parent 4301639 commit 82366fc
Showing 1 changed file with 4 additions and 4 deletions.
Loading

0 comments on commit 82366fc

Please sign in to comment.