aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/clang_flags.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-09-12 15:19:57 -0700
committerTobias Bosch <tbosch@google.com>2019-09-13 18:57:43 +0000
commit3b8531f0c0739003a208b7beb002d1058656a962 (patch)
tree1f53081777ba01d9ecd1b31bd2ee76285a69d91c /compiler_wrapper/clang_flags.go
parentc183559d9c40285129d08a1146cfde0982b6c356 (diff)
downloadtoolchain-utils-3b8531f0c0739003a208b7beb002d1058656a962.tar.gz
Allow to remove env variables.
Previously, we only supported setting env variables to empty, but not to remove it. This lead to the case that we never removed the CCACHE_DISABLE env variable, which kept the ccache disabled, and caused a performance regression compared to the old wrapper as the new wrapper didn't use the ccache in this case. This cl also adds tests for the real exec and run commands to prevent regressions in these cases. BUG=chromium:773875 TEST=new unit tests TEST=performance analysis for TEST=emerge-veyron_jerry --nodeps chromeos-kernel-4_19 Change-Id: I5ca88ba8d7b05c3e12e292465fcd4ff9925b0344 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1802159 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/clang_flags.go')
-rw-r--r--compiler_wrapper/clang_flags.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler_wrapper/clang_flags.go b/compiler_wrapper/clang_flags.go
index 30a0b576..8b76e965 100644
--- a/compiler_wrapper/clang_flags.go
+++ b/compiler_wrapper/clang_flags.go
@@ -13,7 +13,7 @@ import (
func processClangFlags(builder *commandBuilder) error {
env := builder.env
- clangDir := env.getenv("CLANG")
+ clangDir, _ := env.getenv("CLANG")
if clangDir == "" {
if builder.cfg.isHostWrapper {