-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add option to reduce build times when using ThinLTO and ld64 #41058
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
Add option to reduce build times when using ThinLTO and ld64 #41058
Conversation
Internal configurations targeting Darwin employ ThinLTO to improve compiler performance, however using it on all executable causes build time to increase with no matching benefit. To reduce build times in such configurations, we allow some ancillary targets to opt out of LLVM IR optimizations when linking ThinLTO with ld64 (e.g. tools used for bootstrapping or debugging the Swift compiler) -- this behaviour is opt in through a new flag `--swift-tools-ld64-lto-codegen-only-for-supporting-targets`. Addresses rdar://76702687
@swift-ci please smoke test |
preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto |
@swift-ci please smoke test |
preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto |
1 similar comment
preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto |
preset=buildbot_incremental,tools=RA,stdlib=RD,smoketest=macosx,flto |
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the swift_build_support test actually passes (the string splitting in python is odd), LGTM. Thanks for cleaning this up!
@swift-ci please python lint |
The build for the preset |
Internal configurations targeting Darwin employ ThinLTO to
improve compiler performance, however using it on all executable
causes build time to increase with no matching benefit.
To reduce build times in such configurations, we allow some
ancillary targets to opt out of LLVM IR optimizations when linking
ThinLTO with ld64 (e.g. tools used for bootstrapping or debugging the
Swift compiler) -- this behaviour is opt in through a new flag
--swift-tools-ld64-lto-codegen-only-for-supporting-targets
.Addresses rdar://76702687