Add -Zsplit-thin-lto-unit flag to enable ThinLTO unit splitting#111155
Closed
danakj wants to merge 1 commit intorust-lang:masterfrom
Closed
Add -Zsplit-thin-lto-unit flag to enable ThinLTO unit splitting#111155danakj wants to merge 1 commit intorust-lang:masterfrom
danakj wants to merge 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
3 tasks
Collaborator
|
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
This comment has been minimized.
This comment has been minimized.
Closed
3 tasks
b536a9f to
fdef004
Compare
Clang enables the EnableSplitLTOUnit LLVM module flag when compiling for ThinLTO when: * -fsplit-lto-unit is specified, or * -fsanitize=cfi is specified, or * -fwhole-program-vtables. When linking Rust and C++ together and using ThinLTO, the setting for the LLVM module flag "EnableSplitLTOUnit" must match or linking simply fails. The ability to enable this LLVM module flag is then required in order to link Rust objects with C++ objects with ThinLTO for any project that uses the above flags (like Chromium does).
Contributor
Author
|
This is covered by #105452 already which will land soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clang enables the EnableSplitLTOUnit LLVM module flag when compiling for ThinLTO when:
When linking Rust and C++ together and using ThinLTO, the setting for the LLVM module flag "EnableSplitLTOUnit" must match or linking simply fails.
The ability to enable this LLVM module flag is then required in order to link Rust objects with C++ objects with ThinLTO for any project that uses the above flags (like Chromium does).
A change proposal is made for the command line flag here: rust-lang/compiler-team#626