Skip to content

Generate code for unused const- and inline-fns if -Clink-dead-code is specified. - #46916

Merged
bors merged 1 commit into
rust-lang:masterfrom
michaelwoerister:generate-dead-code-plz
Jan 4, 2018
Merged

Generate code for unused const- and inline-fns if -Clink-dead-code is specified.#46916
bors merged 1 commit into
rust-lang:masterfrom
michaelwoerister:generate-dead-code-plz

Conversation

@michaelwoerister

Copy link
Copy Markdown
Member

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

Nice!

@bors

bors commented Dec 21, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit f284ebb has been approved by alexcrichton

@arielb1arielb1 added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Dec 21, 2017
@kennytmkennytm added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 21, 2017
@kennytmkennytm mentioned this pull request Dec 21, 2017
@kennytm

Copy link
Copy Markdown
Member

@bors r-

The new test failed in the rollup.

Comment threadsrc/test/codegen/link-dead-code.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.

Please change the usize to some more portable type. This test is failing on 32-bit platforms.

[00:52:46] ---- [codegen] codegen/link-dead-code.rs stdout ----
[00:52:46] [00:52:46] error: verification with 'FileCheck' failed
[00:52:46] status: exit code: 1
[00:52:46] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/link-dead-code.ll" "/checkout/src/test/codegen/link-dead-code.rs"
[00:52:46] stdout:
[00:52:46] ------------------------------------------
[00:52:46] [00:52:46] ------------------------------------------
[00:52:46] stderr:
[00:52:46] ------------------------------------------
[00:52:46] /checkout/src/test/codegen/link-dead-code.rs:19:17: error: expected string not found in input
[00:52:46] // CHECK-LABEL: define hidden i64 @_ZN14link_dead_code8const_fn
[00:52:46] ^
[00:52:46] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/link-dead-code.ll:1:1: note: scanning from here
[00:52:46] ; ModuleID = 'link_dead_code0-8787f43e282added376259c1adb08b80.rs'
[00:52:46] ^
[00:52:46] /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/link-dead-code.ll:8:1: note: possible intended match here
[00:52:46] define hidden i32 @_ZN14link_dead_code8const_fn17h307759a84b38b8b4E() unnamed_addr #0 {
[00:52:46] ^
[00:52:46] [00:52:46] ------------------------------------------
[00:52:46] [00:52:46] thread '[codegen] codegen/link-dead-code.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:2776:8
[00:52:46] note: Run with `RUST_BACKTRACE=1` for a backtrace.

@kennytmkennytm 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 21, 2017
@pnkfelix

Copy link
Copy Markdown
Contributor

@michaelwoerister are you going to be able to address the problem pointed out by kennytm?

Times getting very tight to backport this into beta...

@michaelwoerister

Copy link
Copy Markdown
MemberAuthor

Whoops, sorry, didn't see this because of PTO.

@michaelwoerister

Copy link
Copy Markdown
MemberAuthor

@bors r=alexcrichton

@bors

bors commented Jan 4, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 238ed47 has been approved by alexcrichton

@bors

bors commented Jan 4, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 238ed47 with merge 8e7a609...

bors added a commit that referenced this pull request Jan 4, 2018
…xcrichton
Generate code for unused const- and inline-fns if -Clink-dead-code is specified.
Fixes#46467.
r? @alexcrichton
@bors

bors commented Jan 4, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 8e7a609 to master...

@bors
bors merged commit 238ed47 into rust-lang:masterJan 4, 2018
@nagisanagisa added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 7, 2018
@alexcrichtonalexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jan 10, 2018
@alexcrichton

Copy link
Copy Markdown
Member

Accepting for backport as it fixes a regression #46467

@MaloJaffreMaloJaffre mentioned this pull request Jan 10, 2018
bors added a commit that referenced this pull request Jan 10, 2018
[beta] Backports
Cherry-picked (cleanly) into beta:
- #46916
- #47161
- #47208
- #47269
@alexcrichtonalexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jan 11, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@michaelwoerister@alexcrichton@bors@kennytm@pnkfelix@nagisa@arielb1