Skip to content

rustc: Further tweak linkage in ThinLTO#46549

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:thinlto-weak
Dec 8, 2017
Merged

rustc: Further tweak linkage in ThinLTO#46549
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:thinlto-weak

Conversation

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown
Contributor

r? @aturon

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

@alexcrichton

Copy link
Copy Markdown
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
Comment thread src/test/run-pass/thinlto/weak-works.rs Outdated

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@bors: r=michaelwoerister

@bors

bors commented Dec 7, 2017

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Dec 8, 2017

Copy link
Copy Markdown
Collaborator

⌛ 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

bors commented Dec 8, 2017

Copy link
Copy Markdown
Collaborator

☀️ 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