Change behavior of doubleBuildWithWNoError for Android
"Double build with -Wno-error" is always on in the Android useLlvmNext
wrapper and always off in the production wrapper. The warnings JSON is
written to $OUT_DIR/warnings_reports.
NFC for the ChromeOS configs.
Originally reviewed in https://android-review.googlesource.com/c/1242126.
BUG=b:149836702
TEST=go test
Change-Id: I5f1a43524772d991b5c64422189643cde61c3826
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2079547
Tested-by: Pirama Arumuga Nainar <pirama@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
diff --git a/compiler_wrapper/compiler_wrapper.go b/compiler_wrapper/compiler_wrapper.go
index c614b99..11fd819 100644
--- a/compiler_wrapper/compiler_wrapper.go
+++ b/compiler_wrapper/compiler_wrapper.go
@@ -108,14 +108,14 @@
}
rusageLogfileName := getRusageLogFilename(env)
bisectStage := getBisectStage(env)
- if shouldForceDisableWError(env) {
+ if newWarningsDir, ok := getNewWarningsDir(env, cfg); ok {
if rusageLogfileName != "" {
return 0, newUserErrorf("GETRUSAGE is meaningless with FORCE_DISABLE_WERROR")
}
if bisectStage != "" {
return 0, newUserErrorf("BISECT_STAGE is meaningless with FORCE_DISABLE_WERROR")
}
- return doubleBuildWithWNoError(env, cfg, compilerCmd)
+ return doubleBuildWithWNoError(env, cfg, newWarningsDir, compilerCmd)
}
if shouldCompileWithFallback(env) {
if rusageLogfileName != "" {