bug 1357825 - use sccache for caching Rust compilation. r=froydnj
authorTed Mielczarek <ted@mielczarek.org>
Mon, 01 May 2017 11:58:45 -0400
changeset 364189 4e3a5199d4fed80eab8dfd8d06ebe07513dd0587
parent 364188 7b26af810b5d8e0796e00301d9108e61b8c72585
child 364190 c9a931f0238d59e19969bd6fd7ea5d1cd2058045
push id32035
push userkwierso@gmail.com
push dateThu, 15 Jun 2017 23:22:48 +0000
treeherdermozilla-central@79cdd4893c46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1357825
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1357825 - use sccache for caching Rust compilation. r=froydnj MozReview-Commit-ID: 84PCmiVBlrV
config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -899,25 +899,30 @@ else
 environment_cleaner =
 endif
 
 rust_unlock_unstable =
 ifdef MOZ_RUST_SIMD
 rust_unlock_unstable += RUSTC_BOOTSTRAP=1
 endif
 
+ifdef MOZ_USING_SCCACHE
+sccache_wrap := RUSTC_WRAPPER='$(CCACHE)'
+endif
+
+
 # This function is intended to be called by:
 #
 #   $(call CARGO_BUILD,EXTRA_ENV_VAR1=X EXTRA_ENV_VAR2=Y ...)
 #
 # but, given the idiosyncracies of make, can also be called without arguments:
 #
 #   $(call CARGO_BUILD)
 define CARGO_BUILD
-env $(environment_cleaner) $(rust_unlock_unstable) $(rustflags_override) \
+env $(environment_cleaner) $(rust_unlock_unstable) $(rustflags_override) $(sccache_wrap) \
 	CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
 	RUSTC=$(RUSTC) \
 	MOZ_SRC=$(topsrcdir) \
 	MOZ_DIST=$(ABS_DIST) \
 	LIBCLANG_PATH="$(MOZ_LIBCLANG_PATH)" \
 	CLANG_PATH="$(MOZ_CLANG_PATH)" \
 	PKG_CONFIG_ALLOW_CROSS=1 \
 	RUST_BACKTRACE=1 \