Skip to content
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

LTO support via GCC AR #386

Closed
daniel-starke opened this issue May 17, 2020 · 1 comment
Closed

LTO support via GCC AR #386

daniel-starke opened this issue May 17, 2020 · 1 comment

Comments

@daniel-starke
Copy link
Contributor

Currently, platformio does not play well in combination with the compile/link flag -flto (enabled via build_flags), which enables link time optimization. This is because the intermediate archive files cannot be created due to the lack of the LTO plugin in binutils' ar. One could work around this by setting the environment variable AR accordingly beforehand. This, however, breaks the purpose of platformio of hiding such platform specific configurations from the user. Another way is to use always gcc-ar instead of the plain ar.
I suggest to change arm-none-eabi-ar into arm-none-eabi-gcc-ar here.
Link time optimization can highly improve flash and memory usage of the compiled firmware.

daniel-starke added a commit to daniel-starke/platform-ststm32 that referenced this issue Aug 3, 2020
@valeros
Copy link
Member

valeros commented Sep 15, 2020

Resolved in 5d6d2e9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants