aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/ccache_flag.go
diff options
context:
space:
mode:
authorJordan R Abrahams-Whitehead <ajordanr@google.com>2022-03-04 00:15:34 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-03-04 00:15:34 +0000
commitc9cb1157f1f9cc5cd081941ba83c8d63657160d0 (patch)
treeb0522edde1d3c5356c95eb1ee2eae3e87befa1f3 /compiler_wrapper/ccache_flag.go
parentcfc899b23937f6aec9ea2de4967dd8d299f3dc6d (diff)
parent9090b1a17bdba39016836261a9f76e6a5336c00e (diff)
downloadtoolchain-utils-c9cb1157f1f9cc5cd081941ba83c8d63657160d0.tar.gz
Merging 25 commit(s) from Chromium's toolchain-utils am: 9090b1a17bllvm-r450784
Original change: https://android-review.googlesource.com/c/platform/external/toolchain-utils/+/2006491 Change-Id: Ib6dabc031aa780e646cec7b31ae0cd33a2f81ac6
Diffstat (limited to 'compiler_wrapper/ccache_flag.go')
-rw-r--r--compiler_wrapper/ccache_flag.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler_wrapper/ccache_flag.go b/compiler_wrapper/ccache_flag.go
index 265b8fc2..02fb43ac 100644
--- a/compiler_wrapper/ccache_flag.go
+++ b/compiler_wrapper/ccache_flag.go
@@ -19,6 +19,13 @@ func processCCacheFlag(builder *commandBuilder) {
return arg.value
})
+ // Disable ccache during portage's src_configure phase. Using ccache here is generally a
+ // waste of time, since these files are very small. Experimentally, this speeds up
+ // configuring by ~13%.
+ if val, present := builder.env.getenv("EBUILD_PHASE"); present && val == "configure" {
+ useCCache = false
+ }
+
if builder.cfg.useCCache && useCCache {
// Note: we used to also set CCACHE_BASEDIR but don't do it
// anymore for reasons outlined in crrev.com/c/2103170.