Skip to content
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

Merged
merged 1 commit into from
Dec 8, 2017

Conversation

alexcrichton
Copy link
Member

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

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @michaelwoerister

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2017
// except according to those terms.

// compile-flags: -C codegen-units=8 -Z thinlto
// ignore-windows
Copy link
Member

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

@michaelwoerister
Copy link
Member

Thank you, Alex! r=me with the test fixed.

@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 7, 2017
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
@alexcrichton
Copy link
Member Author

@bors: r=michaelwoerister

@bors
Copy link
Contributor

bors commented Dec 7, 2017

📌 Commit 17fb43b has been approved by michaelwoerister

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 7, 2017
@bors
Copy link
Contributor

bors commented Dec 8, 2017

⌛ Testing commit 17fb43b with merge 58a05ee...

bors added a commit that referenced this pull request Dec 8, 2017
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
@bors
Copy link
Contributor

bors commented Dec 8, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing 58a05ee to master...

@bors bors merged commit 17fb43b into rust-lang:master Dec 8, 2017
@alexcrichton alexcrichton deleted the thinlto-weak branch January 23, 2018 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants