[android wrapper] Write warning report to stdout on Android
Write the warning report to stdout (surrounded by a tag
<LLVM_NEXT_ERROR_REPORT>). Currently OUT_DIR only gets passed to local
compiles, and so remote compiles can't do the double build. Even if
they write to /tmp, RBE or Goma won't know to copy them as part of the
output.
Packaging the warnings reports is a problem as well since the additional
build step needs extra surgery in soong (it's not possible to add a
dangling, optional build step in Ninja).
Writing the reports to stdout conveniently solves both these issues. We
can just scrape the reports with a script.
Originall reviewed at
https://android-review.googlesource.com/c/platform/external/toolchain-utils/+/1328433/2.
BUG=None
TEST=build master with r391452 and check progress past new errors.
Change-Id: I5f1f71faba002836067a82f6aa4b26d5ba8b7b99
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2239371
Commit-Queue: Pirama Arumuga Nainar <pirama@google.com>
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 da9c866..a7b87dc 100644
--- a/compiler_wrapper/compiler_wrapper.go
+++ b/compiler_wrapper/compiler_wrapper.go
@@ -127,14 +127,14 @@
}
rusageLogfileName := getRusageLogFilename(env)
bisectStage := getBisectStage(env)
- if newWarningsDir, ok := getNewWarningsDir(env, cfg); ok {
+ if shouldForceDisableWerror(env, cfg) {
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, newWarningsDir, compilerCmd)
+ return doubleBuildWithWNoError(env, cfg, compilerCmd)
}
if shouldCompileWithFallback(env) {
if rusageLogfileName != "" {