diff options
| author | bors <bors@rust-lang.org> | 2019-01-29 22:34:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-01-29 22:34:19 +0000 |
| commit | 40e6a0bd766ca7b1c582b964131400b8c3e89d76 (patch) | |
| tree | 554bcd26bf2892af73ae21b4e0588bd40db6b5aa /src/bootstrap | |
| parent | c1c3c4e95b69dfeaca5c5db6c622d7f90ad30a54 (diff) | |
| parent | 99d00c86f85e8c1a7a1ba4cbe23d2e6b0ce85271 (diff) | |
Auto merge of #57953 - mati865:cc-fix, r=alexcrichton
Do not set CC, CFLAGS, CXX, CXXFLAGS, AR, RANLIB in bootstrap, it breaks cross compilation Fixes https://github.com/rust-lang/rust/issues/57812 I tested it in AArch64 Ubuntu container with several days old tree to have all the tools buildable. I did **not** test native builds (amd64 -> amd64), leaving it to CI. r? @alexcrichton
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index f742bce180c..716774632a0 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1051,29 +1051,24 @@ impl<'a> Builder<'a> { } }; let cc = ccacheify(&self.cc(target)); - cargo.env(format!("CC_{}", target), &cc).env("CC", &cc); + cargo.env(format!("CC_{}", target), &cc); let cflags = self.cflags(target, GitRepo::Rustc).join(" "); cargo - .env(format!("CFLAGS_{}", target), cflags.clone()) - .env("CFLAGS", cflags.clone()); + .env(format!("CFLAGS_{}", target), cflags.clone()); if let Some(ar) = self.ar(target) { let ranlib = format!("{} s", ar.display()); cargo .env(format!("AR_{}", target), ar) - .env("AR", ar) - .env(format!("RANLIB_{}", target), ranlib.clone()) - .env("RANLIB", ranlib); + .env(format!("RANLIB_{}", target), ranlib); } if let Ok(cxx) = self.cxx(target) { let cxx = ccacheify(&cxx); cargo .env(format!("CXX_{}", target), &cxx) - .env("CXX", &cxx) - .env(format!("CXXFLAGS_{}", target), cflags.clone()) - .env("CXXFLAGS", cflags); + .env(format!("CXXFLAGS_{}", target), cflags); } } |
