diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-02-14 07:44:53 -0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-02-15 00:04:18 +0800 |
| commit | e0da9902a1ab8e620be45470130cd72e31d54fc2 (patch) | |
| tree | 8c5e904998498ba5c058f1676ce1194d6dde0d6f | |
| parent | ec36e7e972e8036fe7bd428458462a2aacd40927 (diff) | |
| download | rust-e0da9902a1ab8e620be45470130cd72e31d54fc2.tar.gz rust-e0da9902a1ab8e620be45470130cd72e31d54fc2.zip | |
Revert "rustbuild: Pass `ccache` to build scripts"
This reverts commit 64a8730e171367e4979cd9c25f0e0fdc2c157446.
| -rw-r--r-- | src/bootstrap/builder.rs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 74dd4a6fa01..03630dfbed3 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -600,25 +600,9 @@ impl<'a> Builder<'a> { // // FIXME: the guard against msvc shouldn't need to be here if !target.contains("msvc") { - let ccache = self.config.ccache.as_ref(); - let ccacheify = |s: &Path| { - let ccache = match ccache { - Some(ref s) => s, - None => return s.display().to_string(), - }; - // FIXME: the cc-rs crate only recognizes the literal strings - // `ccache` and `sccache` when doing caching compilations, so we - // mirror that here. It should probably be fixed upstream to - // accept a new env var or otherwise work with custom ccache - // vars. - match &ccache[..] { - "ccache" | "sccache" => format!("{} {}", ccache, s.display()), - _ => s.display().to_string(), - } - }; - let cc = ccacheify(&self.cc(target)); - cargo.env(format!("CC_{}", target), &cc) - .env("CC", &cc); + let cc = self.cc(target); + cargo.env(format!("CC_{}", target), cc) + .env("CC", cc); let cflags = self.cflags(target).join(" "); cargo.env(format!("CFLAGS_{}", target), cflags.clone()) @@ -633,9 +617,8 @@ impl<'a> Builder<'a> { } if let Ok(cxx) = self.cxx(target) { - let cxx = ccacheify(&cxx); - cargo.env(format!("CXX_{}", target), &cxx) - .env("CXX", &cxx) + cargo.env(format!("CXX_{}", target), cxx) + .env("CXX", cxx) .env(format!("CXXFLAGS_{}", target), cflags.clone()) .env("CXXFLAGS", cflags); } |
