Skip to content

build-sys: enable LTO #3922

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

Merged
merged 6 commits into from
Jan 24, 2024
Merged

build-sys: enable LTO #3922

merged 6 commits into from
Jan 24, 2024

Conversation

masatake
Copy link
Member

Close #2885.

Copy link

codecov bot commented Jan 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (94d7724) 85.36% compared to head (28d7248) 85.36%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3922   +/-   ##
=======================================
  Coverage   85.36%   85.36%           
=======================================
  Files         234      234           
  Lines       56123    56125    +2     
=======================================
+ Hits        47907    47909    +2     
  Misses       8216     8216           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@masatake masatake force-pushed the enable-lto branch 4 times, most recently from dced70c to 08bb69f Compare January 22, 2024 11:41
@leleliu008
Copy link
Member

leleliu008 commented Jan 23, 2024

doesn't consider adding a configure option like --enable-lto ? We could enable LTO by default in release mode. We also allow user to disable it.

@leleliu008
Copy link
Member

Why not enable LTO when cross compiling?

@masatake
Copy link
Member Author

@leleliu008 Thank you. I added --enable-lto/--disable-lto.

Why not enable LTO when cross compiling?

I don't know whether my change works well with cross-compiling.
Do you think just removing it?

AS_IF([test "x$cross_compiling" != "xyes" -a "x$enable_lto" != "xno"],[

is enough?

AC_CHECK_PROGS([LTO_AR], [gcc-ar ar]

this may be too simple to make my change work well with cross-compiling.

@leleliu008
Copy link
Member

LTO is nothing to do with whether cross compiling or not. I guess it would work if you just removing the cross compiling checking condition, I am on a journey, and didn't bring my laptop, I can't confirm it right now.

@masatake
Copy link
Member Author

LTO is nothing to do with whether cross compiling or not. I guess it would work if you just removing the cross compiling checking condition, I am on a journey, and didn't bring my laptop, I can't confirm it right now.

O.K. I will merge this pull request that disables LTO when cross-compiling.
You can make a pull request to enable LTO + cross-compiling after merging this.

@masatake masatake merged commit b44fba3 into universal-ctags:master Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling LTO (Was: p5.9.20210221.0: build fails)
2 participants