diff options
Diffstat (limited to 'compiler_wrapper/ccache_flag.go')
-rw-r--r-- | compiler_wrapper/ccache_flag.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler_wrapper/ccache_flag.go b/compiler_wrapper/ccache_flag.go index 02fb43ac..0371f10a 100644 --- a/compiler_wrapper/ccache_flag.go +++ b/compiler_wrapper/ccache_flag.go @@ -1,9 +1,14 @@ -// Copyright 2019 The Chromium OS Authors. All rights reserved. +// Copyright 2019 The ChromiumOS Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package main +func isInConfigureStage(env env) bool { + val, present := env.getenv("EBUILD_PHASE") + return present && val == "configure" +} + func processCCacheFlag(builder *commandBuilder) { // We should be able to share the objects across compilers as // the pre-processed output will differ. This allows boards @@ -22,7 +27,7 @@ func processCCacheFlag(builder *commandBuilder) { // 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" { + if isInConfigureStage(builder.env) { useCCache = false } |