-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
enable GCC link-time optimization #2112
Comments
by Sharron LIU: Will execute all existing test cases with LTO enabled, to ensure no regression introduce. Thanks. |
by Andrew Boie: This task is a heavy lift and is highly at risk for 1.7.0, suggest to move to 1.8.0. |
by Mark Linkmeyer: Fixing incorrect priority |
by Andrew Boie: Robert Beatty Mark Linkmeyer |
by Robert Beatty: Andrew Boie , moving to {{v1.9}} and resetting to {{NEW}} |
+1 It will be really interesting to see the results of supporting LTO. |
Can I ask what the state of this is? LTO would be really nice to have I think! |
I haven't looked at the blockers for enabling LTO on the Zephyr tree in a while. In a downstream repo, we enable LTO on our application specific files and disable LTO for the Zephyr files. LTO on just our application specific files saves roughly 5% flash space. |
When I experimented with LTO+Zephyr I found some integration issues with the scripts that zephyr uses to parse it's build files and do multiple link passes that I was unable to solve. The build time was also significantly increased since a lot of work is moved from the parallell compilation to the serial link. So it's not trivial, or for everybody, to enable LTO, but it definitely does make smaller/faster firmwares. |
That's a good saving. In our case, zephyr makes up the majority of the code so the potential is quite a bit larger
Sure, but it's a trade-off I'd like to have at least the option of making. Seems pretty important for embedded systems to have smaller / faster firmwares. I guess, what I'm asking is: Why is the priority set to "low" for an issue that would enable instant space and efficiency gains on a project that prides itself on running on small resource hardware? |
I just want to mention, that our project would also benefit from LTO. |
@tejlmand is this fixed by version |
Reported by Andrew Boie:
As a developer, I would like to enable link-time optimization to further optimize the kernel I am building.
It appears this may have been supported at one point as some arches have this in their Makefile:
cflags-$(CONFIG_LTO) = $(call cc-option,-flto,)
But CONFIG_LTO is not defined in any Kconfig anywhere, and these definitions should be moved out of arch makefiles.
(Imported from Jira ZEP-585)
The text was updated successfully, but these errors were encountered: