-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Add new --test-codegen-backend
bootstrap option
#145256
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
base: master
Are you sure you want to change the base?
Add new --test-codegen-backend
bootstrap option
#145256
Conversation
This PR modifies If appropriate, please update |
faee348
to
65df661
Compare
{ | ||
let sysroot = sysroot.join("lib"); | ||
let sysroot_str = sysroot.as_os_str().to_str().expect("sysroot should be UTF-8"); | ||
cargo.env("LD_LIBRARY_PATH", sysroot_str); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly I still need to change this env variable to be able to build the compiler with the GCC backend. However, no need anymore for the tests. \o/
This comment has been minimized.
This comment has been minimized.
Why isn't it enough to set |
Because as a first step we want to keep |
65df661
to
09c014a
Compare
If stage 1 tests are enough for you, then using the default codegen backend would be enough for that. We would build rustc using LLVM, then build libstd using GCC, and then run tests using GCC. Or do you think we require stage 2 at this moment? |
I have two use cases for this:
|
Forgot but we're supposed to have a command-line argument as described here. |
You can do e.g. x test --set 'rust.codegen-backends=["gcc"]' to run tests with the GCC backend without modifying the config file. I'm fine with having a flag, but I don't think that what the PR currently does is what you want 🤔It only tells compiletest that you're using a rustc that builds stuff using the GCC backend, but you don't make sure that is indeed what happens. In other words, the flag as currently implemented is a no-op, and the actual functionality that gets you GCC used during tests is setting "gcc" as the first member of "rust.codegen-backends". That's why I was confused about what the flag should do and how does it differ from setting the "gcc" field 😅 I would suggest either:
|
This new bootstrap command line flag allows to do:
./x.py test tests/ui/intrinsics/panic-uninitialized-zeroed.rs --stage 1 -j8 --test-codegen-backend gcc
This is the last step before running it into the CI.
Supersedes #144687.
r? @Kobzol