-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
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:
|
09c014a
to
67a7a4d
Compare
Some changes occurred in src/tools/compiletest cc @jieyouxu |
Arf indeed, forgot to put back the |
@bors try jobs=i686-gnu-1,i686-gnu-2 Checking if this won't break the |
This comment has been minimized.
This comment has been minimized.
…, r=<try> Add new `--test-codegen-backend` bootstrap option try-job: i686-gnu-1 try-job: i686-gnu-2
cc @RalfJung: Please confirm that this feature is what you were suggesting in the MCP discussion to run more tests of cg_gcc in the CI. |
I think Ralf is on a vacation, so might take a while to respond. In the meantime I'll review how the LD_LIBRARY_PATH is configured, I'd like to land that separately from the flag. |
I can move it to another PR if you prefer (can wait until your review is done). |
I lost all context, if you could provide some references that'd help. But IIRC all I asked for is a simple command to run these tests that works without much fuzz on as many contributors' systems as reasonably possible -- the usual standard we have for our test suite. Also looking at the error log when the test fails should make it as clear as possible how to reproduce the failure locally (generally we're not great at that; as the number of test suites and targets and other combinations we cover increases, we should think about this more systematically). |
67a7a4d
to
aa8fdd7
Compare
Removed first commit since it was done in #145341. @RalfJung Context was in superseded PR, should have copied it here as well: rust-lang/compiler-team#891 |
☔ The latest upstream changes (presumably #145601) made this pull request unmergeable. Please resolve the merge conflicts. |
Your understanding of the flag is correct. I |
…egen-backend` and `--override-codegen-backend`
2d3ee01
to
e4cdc0f
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Fixed merge conflict. @bors r=Kobzol,bjorn3 rollup |
…gen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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 rust-lang#144687. r? `@Kobzol`
Rollup of 5 pull requests Successful merges: - #144915 (Defer tail call ret ty equality to check_tail_calls) - #145256 (Add new `--test-codegen-backend` bootstrap option) - #145415 (std_detect: RISC-V: implement implication to "C") - #145647 (miri subtree update) - #145650 (Fix JS search scripts path) r? `@ghost` `@rustbot` modify labels: rollup
…gen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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 rust-lang#144687. r? ``@Kobzol``
Rollup of 12 pull requests Successful merges: - #143383 (stabilize `const_array_each_ref`) - #144443 (Make target pointer width in target json an integer) - #144758 ([Doc] Add links to the various collections) - #144915 (Defer tail call ret ty equality to check_tail_calls) - #145256 (Add new `--test-codegen-backend` bootstrap option) - #145415 (std_detect: RISC-V: implement implication to "C") - #145573 (Add an experimental unsafe(force_target_feature) attribute.) - #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause) - #145650 (Fix JS search scripts path) - #145654 (Download CI GCC into the correct directory) - #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions) - #145674 (Enable triagebot `[review-changes-since]` feature) Failed merges: - #145647 (miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…gen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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 rust-lang#144687. r? ```@Kobzol```
Rollup of 14 pull requests Successful merges: - #143383 (stabilize `const_array_each_ref`) - #144443 (Make target pointer width in target json an integer) - #144758 ([Doc] Add links to the various collections) - #144915 (Defer tail call ret ty equality to check_tail_calls) - #145137 (Consolidate panicking functions in `slice/index.rs`) - #145256 (Add new `--test-codegen-backend` bootstrap option) - #145297 (fix(debuginfo): handle false positives in overflow check) - #145415 (std_detect: RISC-V: implement implication to "C") - #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause) - #145650 (Fix JS search scripts path) - #145654 (Download CI GCC into the correct directory) - #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions) - #145674 (Enable triagebot `[review-changes-since]` feature) - #145678 (Fix typo in docstring) r? `@ghost` `@rustbot` modify labels: rollup
…gen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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 rust-lang#144687. r? ````@Kobzol````
Rollup of 15 pull requests Successful merges: - #143383 (stabilize `const_array_each_ref`) - #144758 ([Doc] Add links to the various collections) - #144915 (Defer tail call ret ty equality to check_tail_calls) - #145137 (Consolidate panicking functions in `slice/index.rs`) - #145256 (Add new `--test-codegen-backend` bootstrap option) - #145297 (fix(debuginfo): handle false positives in overflow check) - #145415 (std_detect: RISC-V: implement implication to "C") - #145590 (Prevent impossible combinations in `ast::ModKind`.) - #145621 (Fix some doc typos) - #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause) - #145650 (Fix JS search scripts path) - #145654 (Download CI GCC into the correct directory) - #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions) - #145674 (Enable triagebot `[review-changes-since]` feature) - #145678 (Fix typo in docstring) r? `@ghost` `@rustbot` modify labels: rollup
…gen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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 rust-lang#144687. r? `````@Kobzol`````
Rollup of 19 pull requests Successful merges: - #143383 (stabilize `const_array_each_ref`) - #144758 ([Doc] Add links to the various collections) - #144915 (Defer tail call ret ty equality to check_tail_calls) - #145256 (Add new `--test-codegen-backend` bootstrap option) - #145297 (fix(debuginfo): handle false positives in overflow check) - #145390 (Shorten some dependency chains in the compiler) - #145415 (std_detect: RISC-V: implement implication to "C") - #145525 (stdlib: Replace typedef -> type alias in doc comment) - #145590 (Prevent impossible combinations in `ast::ModKind`.) - #145593 (UnsafePinned::raw_get: sync signature with get) - #145621 (Fix some doc typos) - #145627 (Unconditionally-const supertraits are considered not dyn compatible) - #145642 (Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause) - #145650 (Fix JS search scripts path) - #145654 (Download CI GCC into the correct directory) - #145662 (Enforce correct number of arguments for `"x86-interrupt"` functions) - #145673 (Add flock support for cygwin) - #145674 (Enable triagebot `[review-changes-since]` feature) - #145678 (Fix typo in docstring) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #145256 - GuillaumeGomez:bootstrap-test-codegen-backend, r=Kobzol,bjorn3 Add new `--test-codegen-backend` bootstrap option This new bootstrap command line flag allows to do: ```shell ./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``````
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