diff options
| author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-07-25 14:46:47 +0900 |
|---|---|---|
| committer | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2018-07-25 14:49:23 +0900 |
| commit | a89f8e1340d90de68bf2dd91f7a95c52273bd5f7 (patch) | |
| tree | c9d26c31f8373b3e1bb8f804810357e197e44199 /src/bootstrap | |
| parent | c6d28442e869fa8188314cbb0083cc00b250961e (diff) | |
| download | rust-a89f8e1340d90de68bf2dd91f7a95c52273bd5f7.tar.gz rust-a89f8e1340d90de68bf2dd91f7a95c52273bd5f7.zip | |
bootstrap: use prepare_tool_cargo everywhere
In this way, RUSTC_NO_PREFER_DYNAMIC is already specified and not needed.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/test.rs | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 3bcebd08b1e..6cb70deb86c 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -222,17 +222,18 @@ impl Step for Cargo { compiler, target: self.host, }); - let mut cargo = builder.cargo(compiler, Mode::ToolRustc, self.host, "test"); - cargo - .arg("--manifest-path") - .arg(builder.src.join("src/tools/cargo/Cargo.toml")); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + Mode::ToolRustc, + self.host, + "test", + "src/tools/cargo", + true); + if !builder.fail_fast { cargo.arg("--no-fail-fast"); } - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); - // Don't run cross-compile tests, we may not have cross-compiled libstd libs // available. cargo.env("CFG_DISABLE_CROSS_TESTS", "1"); @@ -289,9 +290,6 @@ impl Step for Rls { "src/tools/rls", true); - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); - builder.add_rustc_lib_path(compiler, &mut cargo); if try_run(builder, &mut cargo) { @@ -345,8 +343,6 @@ impl Step for Rustfmt { "src/tools/rustfmt", true); - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); let dir = testdir(builder, compiler.host); t!(fs::create_dir_all(&dir)); cargo.env("RUSTFMT_TEST_DIR", dir); @@ -394,13 +390,14 @@ impl Step for Miri { extra_features: Vec::new(), }); if let Some(miri) = miri { - let mut cargo = builder.cargo(compiler, Mode::ToolRustc, host, "test"); - cargo - .arg("--manifest-path") - .arg(builder.src.join("src/tools/miri/Cargo.toml")); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + Mode::ToolRustc, + host, + "test", + "src/tools/miri", + true); - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); // miri tests need to know about the stage sysroot cargo.env("MIRI_SYSROOT", builder.sysroot(compiler)); cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); @@ -452,13 +449,14 @@ impl Step for Clippy { extra_features: Vec::new(), }); if let Some(clippy) = clippy { - let mut cargo = builder.cargo(compiler, Mode::ToolRustc, host, "test"); - cargo - .arg("--manifest-path") - .arg(builder.src.join("src/tools/clippy/Cargo.toml")); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + Mode::ToolRustc, + host, + "test", + "src/tools/clippy", + true); - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); // clippy tests need to know about the stage sysroot cargo.env("SYSROOT", builder.sysroot(compiler)); cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); |
