Skip to content

Commit

Permalink
Use builder.cargo() for cargo-vendor.
Browse files Browse the repository at this point in the history
This makes it go through boostrap/bin/rustc.rs, so it will use
-crt-static if needed.
  • Loading branch information
mixi committed May 31, 2018
1 parent ff8f226 commit a8be9bd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,13 +951,16 @@ impl Step for PlainSourceTarball {
has_cargo_vendor |= line.starts_with("cargo-vendor ");
}
if !has_cargo_vendor {
let mut cmd = Command::new(&builder.initial_cargo);
cmd.arg("install")
.arg("--force")
let mut cmd = builder.cargo(
builder.compiler(0, builder.config.build),
Mode::Tool,
builder.config.build,
"install"
);
cmd.arg("--force")
.arg("--debug")
.arg("--vers").arg(CARGO_VENDOR_VERSION)
.arg("cargo-vendor")
.env("RUSTC", &builder.initial_rustc);
.arg("cargo-vendor");
if let Some(dir) = builder.openssl_install_dir(builder.config.build) {
builder.ensure(native::Openssl {
target: builder.config.build,
Expand Down

0 comments on commit a8be9bd

Please sign in to comment.