diff options
| author | Johannes Nixdorf <mixi@exherbo.org> | 2018-05-25 14:04:27 +0200 |
|---|---|---|
| committer | Johannes Nixdorf <mixi@exherbo.org> | 2018-05-31 12:03:29 +0200 |
| commit | ff8f226cab5614bcb340d75d86857ccbf33a33c3 (patch) | |
| tree | c764112cb2e4a12f065ebd6ba847b39b8b9ac265 /src | |
| parent | 81687c4a7f625f03fe3b15e6cb4647e9fbaa39bd (diff) | |
| download | rust-ff8f226cab5614bcb340d75d86857ccbf33a33c3.tar.gz rust-ff8f226cab5614bcb340d75d86857ccbf33a33c3.zip | |
builder.cargo(): don't add "--target"/"--release" to cargo install
This is required to use builder.cargo for cargo-vendor.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/builder.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index d8a449277ab..c9c9c73c84a 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -698,9 +698,14 @@ impl<'a> Builder<'a> { let out_dir = self.stage_out(compiler, mode); cargo .env("CARGO_TARGET_DIR", out_dir) - .arg(cmd) - .arg("--target") - .arg(target); + .arg(cmd); + + if cmd != "install" { + cargo.arg("--target") + .arg(target); + } else { + assert_eq!(target, compiler.host); + } // Set a flag for `check` so that certain build scripts can do less work // (e.g. not building/requiring LLVM). @@ -1022,8 +1027,8 @@ impl<'a> Builder<'a> { } if self.config.rust_optimize { - // FIXME: cargo bench does not accept `--release` - if cmd != "bench" { + // FIXME: cargo bench/install do not accept `--release` + if cmd != "bench" && cmd != "install" { cargo.arg("--release"); } } |
