diff options
| author | bors <bors@rust-lang.org> | 2016-09-16 04:01:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-16 04:01:01 -0700 |
| commit | 8394685b8385156fc4bc31cfbc693867e276d9d7 (patch) | |
| tree | 1ce201fd010be57e767bd462e67aeaef50c9deb8 /src/bootstrap | |
| parent | 89500e934134d19b09e51a1f45430ded65e291b4 (diff) | |
| parent | 5841678f51b9fcb085dba148639a21d95ef91423 (diff) | |
| download | rust-8394685b8385156fc4bc31cfbc693867e276d9d7.tar.gz rust-8394685b8385156fc4bc31cfbc693867e276d9d7.zip | |
Auto merge of #36441 - alexcrichton:rustbuild-target, r=brson
rustbuild: Fix cross-compiles to MinGW on Linux Closes #36290 Closes #36291
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/compile.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index e35f25fa729..9de438cfa7d 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -128,14 +128,16 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) { return } let compiler = Compiler::new(0, &build.config.build); - let compiler = build.compiler_path(&compiler); + let compiler_path = build.compiler_path(&compiler); for file in t!(fs::read_dir(build.src.join("src/rtstartup"))) { let file = t!(file); - build.run(Command::new(&compiler) - .arg("--emit=obj") - .arg("--out-dir").arg(into) - .arg(file.path())); + let mut cmd = Command::new(&compiler_path); + build.add_bootstrap_key(&compiler, &mut cmd); + build.run(cmd.arg("--target").arg(target) + .arg("--emit=obj") + .arg("--out-dir").arg(into) + .arg(file.path())); } for obj in ["crt2.o", "dllcrt2.o"].iter() { |
