diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-27 08:56:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-27 08:56:35 +0100 |
| commit | f435138da9ce4d29feb731bd0db32f1c880b5663 (patch) | |
| tree | d968738d3c0ca655d3ed01e4155bac2a6706c498 /src/bootstrap | |
| parent | 96cfc75584359ae7ad11cc45968059f29e7b44b7 (diff) | |
| parent | 7d2e4e4b6966ae4646e4f87800dafe6cc1b839c2 (diff) | |
| download | rust-f435138da9ce4d29feb731bd0db32f1c880b5663.tar.gz rust-f435138da9ce4d29feb731bd0db32f1c880b5663.zip | |
Rollup merge of #136542 - jieyouxu:build-base, r=onur-ozkan
[`compiletest`-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing
Reference for overall changes: https://github.com/rust-lang/rust/pull/136437
Part **4** of **7** of the *`compiletest`-related cleanups* PR series.
### Summary
- Remove `--build-base` compiletest flag, and introduce `--build-{root,test-suite-root}` flags instead. `--build-base` previously actually is test suite specific build directory, not the root `build/` directory.
- Feed the root build directory directly from bootstrap to compiletest via `--build-root` instead of doing multiple layers of parent unwrapping[^parent] based on the test suite specific build directory.
- Remove a redundant `to_path_buf()`.
[^parent]: Please do not unwrap the parents.
r? bootstrap
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index dfcf26cedd6..709711d9d34 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1793,14 +1793,18 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--src-root").arg(&builder.src); cmd.arg("--src-test-suite-root").arg(builder.src.join("tests").join(suite)); - cmd.arg("--build-base").arg(testdir(builder, compiler.host).join(suite)); + // N.B. it's important to distinguish between the *root* build directory, the *host* build + // directory immediately under the root build directory, and the test-suite-specific build + // directory. + cmd.arg("--build-root").arg(&builder.out); + cmd.arg("--build-test-suite-root").arg(testdir(builder, compiler.host).join(suite)); // When top stage is 0, that means that we're testing an externally provided compiler. // In that case we need to use its specific sysroot for tests to pass. let sysroot = if builder.top_stage == 0 { builder.initial_sysroot.clone() } else { - builder.sysroot(compiler).to_path_buf() + builder.sysroot(compiler) }; cmd.arg("--sysroot-base").arg(sysroot); |
