Skip to content

ICE when using lto and prefer-dynamic #11154

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

Closed
Armavica opened this issue Dec 26, 2013 · 1 comment
Closed

ICE when using lto and prefer-dynamic #11154

Armavica opened this issue Dec 26, 2013 · 1 comment

Comments

@Armavica
Copy link
Contributor

System info:

$ uname -a
Linux Serenno 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

$ rustc --version
rustc 0.9-pre (a1e68de 2013-12-24 20:11:33 -0800)
host: x86_64-unknown-linux-gnu

Running rustc on hello world with -Z lto -Z prefer-dynamic produces the following crash:

$ cat > hello.rs
fn main() { println("Hello world!"); }

$ rustc hello.rs -Z lto -Z prefer-dynamic
task 'rustc' failed at 'assertion failed: !sess.lto()', /home/virgile/.local/src/rust/src/librustc/back/link.rs:1189
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /home/virgile/.local/src/rust/src/librustc/lib.rs:442

The debug output ends with:

$ RUST_LOG=rustc rustc hello.rs -Z lto -Z prefer-dynamic
[...]
reading std
linking std
reading rustuv
linking rustuv
running the pass manager
lto done
task 'rustc' failed at 'assertion failed: !sess.lto()', /home/virgile/.local/src/rust/src/librustc/back/link.rs:1189
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /home/virgile/.local/src/rust/src/librustc/lib.rs:442
@alexcrichton
Copy link
Member

That would be my fault. I was even aware of this at the time of writing, I just wasn't proactive enough to gracefully handle this.

This will always be an error because LTO can only be done for static libs and executables, but the error message should certainly be a bit more amenable.

flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 14, 2023
…ip1995

Trigger a rebuild when `CLIPPY_CONF_DIR` changes

changelog: none

This is a fix for rust-lang/rust-clippy#9928 (comment), any time `CLIPPY_CONF_DIR` changes cargo will now rebuild the crate clippy is being run on, giving it a chance to lint with the (potentially) different config file

r? `@flip1995`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants