diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-12-12 11:36:52 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-12-14 15:40:18 -0800 |
commit | 96a5fc76dcce1bd6669a9e288721ee6aad521096 (patch) | |
tree | 9fb1678923a567cd6de665b3e3acbbb004aace1e /configure | |
parent | 0d558d012a4be0273e547864923bfe29b14e30d5 (diff) |
rustbuild: Add sccache support
This commit adds support for sccache, a ccache-like compiler which works on MSVC
and stores results into an S3 bucket. This also switches over all Travis and
AppVeyor automation to using sccache to ensure a shared and unified cache over
time which can be shared across builders.
The support for sccache manifests as a new `--enable-sccache` option which
instructs us to configure LLVM differently to use a 'sccache' binary instead of
a 'ccache' binary. All docker images for Travis builds are updated to download
Mozilla's tooltool builds of sccache onto various containers and systems.
Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of
our ccache goodies.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/configure b/configure index 0a07e41fb97..e495c0d3abd 100755 --- a/configure +++ b/configure @@ -621,6 +621,7 @@ opt llvm-assertions 0 "build LLVM with assertions" opt debug-assertions 0 "build with debugging assertions" opt fast-make 0 "use .gitmodules as timestamp for submodule deps" opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds" +opt sccache 0 "invoke gcc/clang via sccache to reuse object files between builds" opt local-rust 0 "use an installed rustc rather than downloading a snapshot" opt local-rebuild 0 "assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version" opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM" @@ -1677,11 +1678,23 @@ do LLVM_CC_64_ARG1="gcc" ;; ("gcc") - LLVM_CXX_32="g++" - LLVM_CC_32="gcc" + if [ -z "$CFG_ENABLE_SCCACHE" ]; then + LLVM_CXX_32="g++" + LLVM_CC_32="gcc" - LLVM_CXX_64="g++" - LLVM_CC_64="gcc" + LLVM_CXX_64="g++" + LLVM_CC_64="gcc" + else + LLVM_CXX_32="sccache" + LLVM_CC_32="sccache" + LLVM_CXX_32_ARG1="g++" + LLVM_CC_32_ARG1="gcc" + + LLVM_CXX_64="sccache" + LLVM_CC_64="sccache" + LLVM_CXX_64_ARG1="g++" + LLVM_CC_64_ARG1="gcc" + fi ;; (*) |