-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[BUG] Llvm-plugins failed when build the same nightly rustc to stage2 rustc #137954
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
Comments
Does this repro on a rustc built on latest master? And what rustc is the |
No. I build from scratch of the nightly (3f28fe1) compiler by This bug can be reproduced I think, and looks strange. I don't know how to address it. |
That commit is ancient. Like, more than a year ago. I ask what |
cargo build -> I build the rust-url project. But actually this case applies to HelloWorld Rust program. I don't think the commit is old. Just close to a year. Besides, for example, a lot of projects rely on llvm. Usually we cannot update to too recent llvm version. This rustc supports llvm-17, which is already quite new. The rustc is also quite new. (We all know that a project undergoes one year is so common.) Here is cargo -vV.
|
Another way is that maybe I want to know, how to build a rustc compiler from scratch as the same as nightly-installed compiler? |
You are not using the |
I can cinfirm that I used -Z llvm-plugins just a month ago successfully with Enzyme on a self-build rustc. I can share more details later today. I did use the configure command mentioned here: I am pretty sure llvm.enable_plugins isn't set to true by default. |
Oh right. You may need to explicitly build LLVM and also configure [llvm]
plugins = true But I'm not 100% sure, because I've never used this myself. |
Hi @ZuseZ4 , the configuration setting works, and it fixes the issue. Thanks. |
Hi guys, I try to use these commands to build the rustc compiler from the source and link its stage2. I just modified the
nightly
config in the config.toml, and found it cannot-Z llvm-plugins=
load the passes. However, I can do it successfully in the same version of therustup install nightly-x
compiler.Here is the
rustc --version --verbose
message of both nightly and stage2 versions:Here is the error message of the stage2 compiler. The nightly-installed one can successfully execute.
What is the correct config.example.toml setting and the procedure?
The text was updated successfully, but these errors were encountered: