mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 01:42:54 +03:00
bootstrap: only build rust_test_helpers for {incremental,ui} suites
This commit is contained in:
@@ -1624,9 +1624,6 @@ fn run(self, builder: &Builder<'_>) {
|
||||
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 @@ fn run(self, builder: &Builder<'_>) {
|
||||
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 @@ fn run(self, builder: &Builder<'_>) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user