Skip to content

rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5. - #53239

Merged
bors merged 1 commit into
rust-lang:masterfrom
cuviper:llvm5-closure-alloca
Aug 14, 2018
Merged

rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.#53239
bors merged 1 commit into
rust-lang:masterfrom
cuviper:llvm5-closure-alloca

Conversation

@cuviper

Copy link
Copy Markdown
Member

This hack was removed in #50949, but without it I found that building
std with full debuginfo would print many LLVM DW_OP_LLVM_fragment
errors, then die LLVM ERROR: Failed to strip malformed debug info.

It doesn't seem to be a problem for LLVM 6, so we can re-enable the hack
just for older LLVM.

This reverts commit da579ef.
Fixes#53204.
r? @eddyb

This hack was removed in rust-lang#50949, but without it I found that building
`std` with full debuginfo would print many LLVM `DW_OP_LLVM_fragment`
errors, then die `LLVM ERROR: Failed to strip malformed debug info`.
It doesn't seem to be a problem for LLVM 6, so we can re-enable the hack
just for older LLVM.
This reverts commit da579ef.
Fixesrust-lang#53204.
r? @eddyb
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2018
@eddyb

Copy link
Copy Markdown
Contributor

@bors r+ This sucks, but maybe LLVM 5.x won't stay too long with us.

@bors

bors commented Aug 10, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 763e721 has been approved by eddyb

@borsbors 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 10, 2018
@gnzlbg

Copy link
Copy Markdown
Contributor

This sucks, but maybe LLVM 5.x won't stay too long with us.

As soon as RHEL starts shipping with LLVM6 (or newer) I'll open a new issue to update the minimum rust LLVM version to LLVM 6

@cuviper

Copy link
Copy Markdown
MemberAuthor

As soon as RHEL starts shipping with LLVM6 (or newer)

Base RHEL doesn't really ship a usable LLVM at all, but I can put a newer version in EPEL7 for Rust when needed, and our toolset SCLs have their own. The more immediate problem for me is that Fedora 27 only has LLVM 5 and will be more annoying to update, but that will go out of support shortly after F29 is released, probably in December.

@cuviper

Copy link
Copy Markdown
MemberAuthor

I'm nominating this for beta too, because it's a regression in stable, and would be nice to have fixed in 1.29. I can just patch our builds if that's not accepted though, as I have for 1.28.

@cuvipercuviper added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 10, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 13, 2018
rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.
This hack was removed in rust-lang#50949, but without it I found that building
`std` with full debuginfo would print many LLVM `DW_OP_LLVM_fragment`
errors, then die `LLVM ERROR: Failed to strip malformed debug info`.
It doesn't seem to be a problem for LLVM 6, so we can re-enable the hack
just for older LLVM.
This reverts commit da579ef.
Fixesrust-lang#53204.
r? @eddyb
@kennytmkennytm mentioned this pull request Aug 13, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Aug 14, 2018
rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.
This hack was removed in rust-lang#50949, but without it I found that building
`std` with full debuginfo would print many LLVM `DW_OP_LLVM_fragment`
errors, then die `LLVM ERROR: Failed to strip malformed debug info`.
It doesn't seem to be a problem for LLVM 6, so we can re-enable the hack
just for older LLVM.
This reverts commit da579ef.
Fixesrust-lang#53204.
r? @eddyb
@kennytmkennytm mentioned this pull request Aug 14, 2018
bors added a commit that referenced this pull request Aug 14, 2018
Rollup of 11 pull requests
Successful merges:
- #53112 (pretty print BTreeSet)
- #53208 (Don't panic on std::env::vars() when env is null.)
- #53226 (driver: set the syntax edition in phase 1)
- #53229 (Make sure rlimit is only ever increased)
- #53233 (targets: aarch64: Add bare-metal aarch64 target)
- #53239 (rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.)
- #53246 (A few cleanups)
- #53257 (Idiomatic improvements to IP method)
- #53274 (Remove statics field from CodegenCx)
- #53290 (Make LLVM emit assembly comments with -Z asm-comments)
- #53317 (Mark prior failure to avoid ICE)
@bors
bors merged commit 763e721 into rust-lang:masterAug 14, 2018
@emilyalbiniemilyalbini added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 25, 2018
@nikomatsakis

Copy link
Copy Markdown
Contributor

Accepting for beta (cc @rust-lang/compiler) -- restoring previous code so ought to be ok, fixes regression.

@nikomatsakisnikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 25, 2018
@emilyalbiniemilyalbini mentioned this pull request Aug 25, 2018
@emilyalbiniemilyalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 25, 2018
bors added a commit that referenced this pull request Aug 25, 2018
[beta] Rollup backports
Merged and approved:
* #53559: add macro check for lint
* #53509: resolve: Reject some inaccessible candidates sooner during import resolution
* #53239: rustc_codegen_llvm: Restore the closure env alloca hack for LLVM 5.
* #53235: Feature gate where clauses on associated type impls
* #53516: resolve: Continue search in outer scopes after applying derive resolution fallback
r? @ghost
@cuviper
cuviper deleted the llvm5-closure-alloca branch March 27, 2019 22:20
@workingjubileeworkingjubilee added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label May 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.beta-acceptedAccepted for backporting to the compiler in the beta channel.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.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.

LLVM5: Failed to strip malformed debug info

8 participants

@cuviper@eddyb@bors@gnzlbg@nikomatsakis@emilyalbini@rust-highfive@workingjubilee