Add option to allow unknown warning options

Some build targets pulls cflags from build/soong but has its own choice
of compiler version. This causes errors for due to unknown warning
options. This allows them to suppress such checks.

Test: presubmit
Change-Id: Ia89508d6b92481fb1ed0c90f1fdb4d8e54566349
This commit is contained in:
Yi Kong
2022-07-21 15:49:05 +08:00
parent a9eef7bd2d
commit f7f69e4992

View File

@@ -375,6 +375,10 @@ func init() {
flags = append(flags, llvmNextExtraCommonGlobalCflags...)
}
if ctx.Config().IsEnvTrue("ALLOW_UNKNOWN_WARNING_OPTION") {
flags = append(flags, "-Wno-error=unknown-warning-option")
}
return strings.Join(flags, " ")
})