-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc: Further tweak linkage in ThinLTO #46549
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
// except according to those terms. | ||
|
||
// compile-flags: -C codegen-units=8 -Z thinlto | ||
// ignore-windows |
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.
Needs // min-llvm-version 4.0
.
[00:48:34] ---- [run-pass] run-pass/thinlto/weak-works.rs stdout ----
[00:48:34]
[00:48:34] error: compilation failed!
[00:48:34] status: exit code: 101
[00:48:34] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/thinlto/weak-works.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--target=x86_64-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/thinlto/weak-works.stage2-x86_64-unknown-linux-gnu" "-Crpath" "-O" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "codegen-units=8" "-Z" "thinlto" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/thinlto/weak-works.stage2-x86_64-unknown-linux-gnu.aux"
[00:48:34] stdout:
[00:48:34] ------------------------------------------
[00:48:34]
[00:48:34] ------------------------------------------
[00:48:34] stderr:
[00:48:34] ------------------------------------------
[00:48:34] error: this compiler's LLVM does not support ThinLTO
Thank you, Alex! r=me with the test fixed. |
In rust-lang#46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes rust-lang#46543
cb1ca56
to
17fb43b
Compare
@bors: r=michaelwoerister |
📌 Commit 17fb43b has been approved by |
rustc: Further tweak linkage in ThinLTO In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the loop that registered all otherwise exported GUID values as "don't internalize me please" was erroneously too conservative and only asking "external" linkage items to not be internalized. Instead we actually want the inversion of that condition, everything *without* "local" linkage to be internalized. This commit updates the condition there, adds a test, and... Closes #46543
☀️ Test successful - status-appveyor, status-travis |
In #46382 the logic around linkage preservation with ThinLTO ws tweaked but the
loop that registered all otherwise exported GUID values as "don't internalize
me please" was erroneously too conservative and only asking "external" linkage
items to not be internalized. Instead we actually want the inversion of that
condition, everything without "local" linkage to be internalized.
This commit updates the condition there, adds a test, and...
Closes #46543