-
-
Notifications
You must be signed in to change notification settings - Fork 697
Use GCC wrapped ar & ranlib to enable LTO #1329
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
Conversation
LTO shifts compilation to the final link, allowing for more aggressive optimisations. AR & RANLIB need to use their gcc equivalents to enable this, and will otherwise behave identically if LTO data is not in the objects. Signed-off-by: Alastair D'Silva <[email protected]>
Note: This appears to a rehash of #702 |
Using LTO since over a year with project Tasmota and it is working. |
The |
@valeros espressif Arduino is already using |
@Jason2866 thanks for the info. I didn't notice this change in 2.0.14, so I believe it's currently only available in the core dev branch for v3.x? |
@valeros Yes, it is added in dev branch v3.x and will be there in release v3.0.0 |
@valeros this change in itself doesn't enable LTO, it just removes things that get in the way of enabling it. It should be completely transparent to non-LTO builds. |
Exactly, without explicit enabling LTO there will be no change in compiled code by merging the PR. |
Thanks for the PR, merged! |
LTO shifts compilation to the final link, allowing for more aggressive optimisations. AR & RANLIB need to use their gcc equivalents to enable this, and will otherwise behave identically if LTO data is not in the objects. Signed-off-by: Alastair D'Silva <[email protected]>
As per platformio/platform-ststm32#386
Link Time Optimisation shifts compilation to the final link, allowing for more aggressive optimisations.
AR & RANLIB need to use their gcc equivalents to enable this, and will otherwise behave identically if LTO data is not in the objects.
(This should probably be done for all platforms)