Suppress warnings while testing a new compiler
The -Wmacro-redefined warning causes a build failure after building the
musl libc++ with the LIBCXX_HAS_MUSL_LIBC CMake var
(r.android.com/3355477).
Bug: http://b/379357589
Test: treehugger
Change-Id: I8b4f6f659609effef9fb283167c578f6b1d7ed9b
diff --git a/rust/bindgen.go b/rust/bindgen.go
index 3944495..f792925 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -300,6 +300,11 @@
// it cannot recognize. Turn off unknown warning flags warning.
cflags = append(cflags, "-Wno-unknown-warning-option")
+ // Suppress warnings while testing a new compiler.
+ if ctx.Config().IsEnvTrue("LLVM_NEXT") {
+ cflags = append(cflags, "-Wno-everything")
+ }
+
outputFile := android.PathForModuleOut(ctx, b.BaseSourceProvider.getStem(ctx)+".rs")
var cmd, cmdDesc string