diff options
| author | bors <bors@rust-lang.org> | 2017-03-18 00:40:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-03-18 00:40:10 +0000 |
| commit | 703b246287fa9e7ef39bd66f978f6dc6fa119c15 (patch) | |
| tree | 55e444585a92024caf0f87d5b44e6061fc3590f3 /src/bootstrap | |
| parent | a559452b05c20041a27f518d262573c56b876b64 (diff) | |
| parent | 61d93877b70cfb9cab974ef2fb3c60d9cb50f72f (diff) | |
| download | rust-703b246287fa9e7ef39bd66f978f6dc6fa119c15.tar.gz rust-703b246287fa9e7ef39bd66f978f6dc6fa119c15.zip | |
Auto merge of #40482 - wagenet:fix-old-macos, r=alexcrichton
Target builds for older macOS Fix #40481
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/compile.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 4201475c60c..eeec7eb029e 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -20,6 +20,7 @@ use std::collections::HashMap; use std::fs::{self, File}; use std::path::{Path, PathBuf}; use std::process::Command; +use std::env; use build_helper::{output, mtime, up_to_date}; use filetime::FileTime; @@ -44,6 +45,11 @@ pub fn std(build: &Build, target: &str, compiler: &Compiler) { build.clear_if_dirty(&out_dir, &build.compiler_path(compiler)); let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build"); let mut features = build.std_features(); + + if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") { + cargo.env("MACOSX_DEPLOYMENT_TARGET", target); + } + // When doing a local rebuild we tell cargo that we're stage1 rather than // stage0. This works fine if the local rust and being-built rust have the // same view of what the default allocator is, but fails otherwise. Since @@ -170,6 +176,9 @@ pub fn test(build: &Build, target: &str, compiler: &Compiler) { let out_dir = build.cargo_out(compiler, Mode::Libtest, target); build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target)); let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build"); + if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") { + cargo.env("MACOSX_DEPLOYMENT_TARGET", target); + } cargo.arg("--manifest-path") .arg(build.src.join("src/libtest/Cargo.toml")); build.run(&mut cargo); |
