diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-04-06 16:21:02 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-06 16:21:02 +1000 |
| commit | f55034b2ebfb14c1748f30c25814e442727ee79e (patch) | |
| tree | d013a578d511d1066583be94298dd44e5cf3a3ed /src | |
| parent | fededb9906d5347128f5feafb441772dc4c26315 (diff) | |
| parent | c25207d8690a14c8d61aa215cd502d8ad581a0ea (diff) | |
| download | rust-f55034b2ebfb14c1748f30c25814e442727ee79e.tar.gz rust-f55034b2ebfb14c1748f30c25814e442727ee79e.zip | |
Rollup merge of #139347 - jieyouxu:rust_test_helpers, r=onur-ozkan
Only build `rust_test_helpers` for `{incremental,ui}` test suites
Only build `rust_test_helpers` for `{incremental,ui}` test suites.
Context: Trying to see what test suites actually need `rust_test_helpers`, because this was causing unnecessary local failures when trying to run `./x test tests/run-make --target=wasm32-unknown-unknown` when `run-make` tests don't need `rust_test_helpers` at all.
r? `@ghost`
try-job: armhf-gnu
try-job: test-various
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw-1
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 81f6b473c45..8e42e845a8c 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1624,9 +1624,6 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the builder.tool_exe(Tool::RunMakeSupport); } - // Also provide `rust_test_helpers` for the host. - builder.ensure(TestHelpers { target: compiler.host }); - // ensure that `libproc_macro` is available on the host. if suite == "mir-opt" { builder.ensure(compile::Std::new(compiler, compiler.host).is_for_mir_opt_tests(true)); @@ -1634,11 +1631,6 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the builder.ensure(compile::Std::new(compiler, compiler.host)); } - // As well as the target - if suite != "mir-opt" { - builder.ensure(TestHelpers { target }); - } - let mut cmd = builder.tool_cmd(Tool::Compiletest); if suite == "mir-opt" { @@ -1804,11 +1796,18 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the } let mut hostflags = flags.clone(); - hostflags.push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display())); hostflags.extend(linker_flags(builder, compiler.host, LldThreads::No, compiler.stage)); let mut targetflags = flags; - targetflags.push(format!("-Lnative={}", builder.test_helpers_out(target).display())); + + // Provide `rust_test_helpers` for both host and target. + if suite == "ui" || suite == "incremental" { + builder.ensure(TestHelpers { target: compiler.host }); + builder.ensure(TestHelpers { target }); + hostflags + .push(format!("-Lnative={}", builder.test_helpers_out(compiler.host).display())); + targetflags.push(format!("-Lnative={}", builder.test_helpers_out(target).display())); + } for flag in hostflags { cmd.arg("--host-rustcflags").arg(flag); |
