aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/disable_werror_flag.go
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2021-01-25 12:11:56 -0800
committerGeorge Burgess <gbiv@chromium.org>2021-01-29 17:39:12 +0000
commit8126715006b533888697689276b771cf6cdc2063 (patch)
tree7f8273650dd0fb798b199a52882b885df2860917 /compiler_wrapper/disable_werror_flag.go
parent77a0c2073a603ce6698f3667036e62a572cbb37c (diff)
downloadtoolchain-utils-8126715006b533888697689276b771cf6cdc2063.tar.gz
compiler_wrapper: disable force-disable-werror with GCC
Enabling this functionality with GCC is pointless -- we don't roll it, so we don't want to catch new -Werrors with it. We're having some GCC-specific functionality coming in soon; disabling this simplifies things some. BUG=chromium:1166017 TEST=CQ Change-Id: I3f73a8124ea85a2f14fd5c909a9bbed2b46f28f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2648431 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/disable_werror_flag.go')
-rw-r--r--compiler_wrapper/disable_werror_flag.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler_wrapper/disable_werror_flag.go b/compiler_wrapper/disable_werror_flag.go
index 3974dcb3..9bbf2e25 100644
--- a/compiler_wrapper/disable_werror_flag.go
+++ b/compiler_wrapper/disable_werror_flag.go
@@ -19,10 +19,15 @@ import (
const numWErrorEstimate = 30
-func shouldForceDisableWerror(env env, cfg *config) bool {
+func shouldForceDisableWerror(env env, cfg *config, ty compilerType) bool {
if cfg.isAndroidWrapper {
return cfg.useLlvmNext
}
+
+ // We only want this functionality for clang.
+ if ty != clangType {
+ return false
+ }
value, _ := env.getenv("FORCE_DISABLE_WERROR")
return value != ""
}