aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/ccache_flag.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-06-20 17:47:19 -0700
committerTobias Bosch <tbosch@google.com>2019-06-25 14:47:26 +0000
commitaa31116c1d7c2491245604f0564e0693f22dfd71 (patch)
tree4fd8fb92a9a459bb718f8d0c943a05632defbd08 /compiler_wrapper/ccache_flag.go
parentb9992bba3b4e752f10410c624a500762d090fa2b (diff)
downloadtoolchain-utils-aa31116c1d7c2491245604f0564e0693f22dfd71.tar.gz
Allow to pass in the use_ccache via go build.
Removes usage of go build tags in favor of passing in configuration via -ldflags -X ... BUG=chromium:773875 TEST=unit test Change-Id: I4e8a58e1679b2858e9d4620d6b9c7a35ad08a6ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1670987 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
Diffstat (limited to 'compiler_wrapper/ccache_flag.go')
-rw-r--r--compiler_wrapper/ccache_flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler_wrapper/ccache_flag.go b/compiler_wrapper/ccache_flag.go
index 13ee234d..95dd296a 100644
--- a/compiler_wrapper/ccache_flag.go
+++ b/compiler_wrapper/ccache_flag.go
@@ -15,7 +15,7 @@ func processCCacheFlag(sysroot string, builder *commandBuilder) {
return arg.Value
})
- if useCCache {
+ if builder.cfg.useCCache && useCCache {
// We need to get ccache to make relative paths from within the
// sysroot. This lets us share cached files across boards (if
// all other things are equal of course like CFLAGS) as well as