-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rust cargo-first builds] Build the GCC toolchains for Windows with --with-gnu-ld
to avoid too-long-command-line linking errors (IDFGH-6187)
#7864
Comments
--with-gnu-ld
to avoid too-long-command-line linking errors--with-gnu-ld
to avoid too-long-command-line linking errors (IDFGH-6187)
@ivmarkov There is a build with using |
As mentioned here I've checked and it indeed does work. |
Checked, thanks! We will add this fix in the next toolchain release for Windows |
@antmak Any ETA when the next toolchain release for Windows is expected? |
Yep would really like to have this as my project now needs to generate temporary cpp files and exclude the other .cpp files to make it compile in Windows. So looking forward to this fix. |
@antmak Please, can you share details about the solution. AFAIK there is an update in tools.json. Espressif-bot just closed the issue without details. |
@JurajSadel - can you confirm the solution by results of your tests? |
@antmak @georgik @JurajSadel I assume we "just" need to do a The problem is that since one week or so we cannot build against ESP-IDF master (4.4 and 4.3.X work fine): https://github.com/esp-rs/esp-idf-template/actions/runs/1681595816 @N3xed ^^^ |
@ivmarkov That's right, if you pull latest |
Thanks igrr. Also you can cherry-pick commit d836163 into your IDF work directory or branch. Or download archives with JFI, gcc shows its built options:
There is |
@Jason2866 There were some issues with uploading the update to Platformio due to its limitation. Will be updated soon |
…h-gnu-ld option Closes espressif#7864
…h-gnu-ld option Closes espressif#7864
For various reasons which are unavoidable, the Rust builds driven via cargo do generate a very long linker command line, which goes above the 32767 character limit on Windows.
There is an escape hatch we are taking advantage of, which is to supply (most of) the link command-line arguments to the
xtensa-esp32-elf-gcc.exe
executable in a file. E.g.@F:\\... ...\\linker_args.txt
Unfortunately, when
xtensa-esp32-elf-gcc.exe
is itself calling theLD
executable, it does expand the command line arguments supplied in the@
file, and thus we have the too-long-command-line problem again, but this time further down the process chain.It seems the above file expansion does not happen, as long as the GCC toolchain for windows is compiled with the
--with-gnu-ld
flag enabled.Therefore, we would like to request the GCC toolchains for Windows to always be build with
--with-gnu-ld
flag enabled.The text was updated successfully, but these errors were encountered: