-
Notifications
You must be signed in to change notification settings - Fork 595
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 link time optimisation in builds #139
Comments
I have a WIP branch at https://github.com/mithro/litex/tree/enable-lto?files=1 |
It is unclear why we have to link against libgcc when the symbols should be provided by |
This has been integrated with #401. For now it's enabled with for all processors except LM32. If this is causing issue with others configurations, we'll add a parameter be able to disable LTO when needed. |
LTO has been reverted in 979f98e since seems to cause subtle issues on some configurations. We'll have to test it more before enabling it. |
In case it helps, the link issue I had (in #417) with Also (as I said in the same comment) maybe having a build time option to "force LTO off" would help anyone thinking their target is suffering from bad LTO handling. In general I think it'd be a great idea to have LTO available as a build option, and probably even on by default. Ewen |
Having LTO on by default with a way to easily turn it off seems like a good plan. If LTO is off by default, it will just end up bit rotting until it no longer works. |
I'm also ok with that, we just need to work a bit more on it before integrating it. |
I just found this issue, should I close #682 which is a duplicate of this?
This is not necessary. It was required because libcompiler_rt was optimized out. |
@DurandA It looks to me like #682 is much more active now. I'd probably lean towards closing this issue (which was already closed once, then reopened when the patch was reverted), with a comment like "LTO (re-)implementation work moved to #682"... (Looks like @mithro or @enjoy-digital digital would have to be the ones to close this specific older issue.) Ewen |
Let's keep #682 and close this one. |
Link time optimisation seems to be resulting in much smaller binaries as any unused elements can be totally removed.
There are however some issues to make this work;
The text was updated successfully, but these errors were encountered: