diff options
| author | bors <bors@rust-lang.org> | 2017-01-21 00:56:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-21 00:56:18 +0000 |
| commit | aedb49cbc9977fee56bb51a20980b380aca53659 (patch) | |
| tree | 65cdd472388b112d1bb3aba847f596ac13067755 /src/bootstrap | |
| parent | a52da95ced667fe8ff490f73c0b041a4f926c041 (diff) | |
| parent | 8bee3983f8d480ee928c40f5d92394da0adba9c2 (diff) | |
| download | rust-aedb49cbc9977fee56bb51a20980b380aca53659.tar.gz rust-aedb49cbc9977fee56bb51a20980b380aca53659.zip | |
Auto merge of #39199 - alexcrichton:rollup, r=alexcrichton
Rollup of 28 pull requests - Successful merges: #38603, #38761, #38842, #38847, #38955, #38966, #39062, #39068, #39077, #39111, #39112, #39114, #39118, #39120, #39132, #39135, #39138, #39142, #39143, #39146, #39157, #39166, #39167, #39168, #39179, #39184, #39195, #39197 - Failed merges: #39060, #39145
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/cc.rs | 8 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/flags.rs | 8 | ||||
| -rw-r--r-- | src/bootstrap/sanity.rs | 2 |
4 files changed, 18 insertions, 6 deletions
diff --git a/src/bootstrap/cc.rs b/src/bootstrap/cc.rs index aa70e24d952..54c8194678e 100644 --- a/src/bootstrap/cc.rs +++ b/src/bootstrap/cc.rs @@ -121,10 +121,14 @@ fn set_compiler(cfg: &mut gcc::Config, } "mips-unknown-linux-musl" => { - cfg.compiler("mips-linux-musl-gcc"); + if cfg.get_compiler().path().to_str() == Some("gcc") { + cfg.compiler("mips-linux-musl-gcc"); + } } "mipsel-unknown-linux-musl" => { - cfg.compiler("mipsel-linux-musl-gcc"); + if cfg.get_compiler().path().to_str() == Some("gcc") { + cfg.compiler("mipsel-linux-musl-gcc"); + } } t if t.contains("musl") => { diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 0eeb799672c..079f93e7331 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -213,7 +213,11 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) { if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) { cargo.env("CFG_LLVM_ROOT", s); } - if build.config.llvm_static_stdcpp { + // Building with a static libstdc++ is only supported on linux right now, + // not for MSVC or OSX + if build.config.llvm_static_stdcpp && + !target.contains("windows") && + !target.contains("apple") { cargo.env("LLVM_STATIC_STDCPP", compiler_file(build.cxx(target), "libstdc++.a")); } diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 1be823417d7..c5bbfd89b27 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -287,8 +287,8 @@ To learn more about a subcommand, run `./x.py <command> -h` build: m.opt_str("build").unwrap_or_else(|| { env::var("BUILD").unwrap() }), - host: m.opt_strs("host"), - target: m.opt_strs("target"), + host: split(m.opt_strs("host")), + target: split(m.opt_strs("target")), config: cfg_file, src: m.opt_str("src").map(PathBuf::from), jobs: m.opt_str("jobs").map(|j| j.parse().unwrap()), @@ -309,3 +309,7 @@ impl Subcommand { } } } + +fn split(s: Vec<String>) -> Vec<String> { + s.iter().flat_map(|s| s.split(',')).map(|s| s.to_string()).collect() +} diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 66bdd5e00f4..8e79c2d27d1 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -45,7 +45,7 @@ pub fn check(build: &mut Build) { let target = path.join(cmd); let mut cmd_alt = cmd.to_os_string(); cmd_alt.push(".exe"); - if target.exists() || + if target.is_file() || target.with_extension("exe").exists() || target.join(cmd_alt).exists() { return Some(target); |
