Merge "Revert "Remove flags rejected by RBE input processor"" into main
diff --git a/cc/builder.go b/cc/builder.go
index 3f582fa..69cf75b 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -681,16 +681,11 @@
tidyCmd := "${config.ClangBin}/clang-tidy"
rule := clangTidy
- reducedCFlags := moduleFlags
if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_CLANG_TIDY") {
rule = clangTidyRE
- // b/248371171, work around RBE input processor problem
- // some cflags rejected by input processor, but usually
- // do not affect included files or clang-tidy
- reducedCFlags = config.TidyReduceCFlags(reducedCFlags)
}
- sharedCFlags := shareFlags("cFlags", reducedCFlags)
+ sharedCFlags := shareFlags("cFlags", moduleFlags)
srcRelPath := srcFile.Rel()
// Add the .tidy rule
diff --git a/cc/config/tidy.go b/cc/config/tidy.go
index efa4549..b40557a 100644
--- a/cc/config/tidy.go
+++ b/cc/config/tidy.go
@@ -16,7 +16,6 @@
import (
"android/soong/android"
- "regexp"
"strings"
)
@@ -281,11 +280,3 @@
}
return flags
}
-
-var (
- removedCFlags = regexp.MustCompile(" -fsanitize=[^ ]*memtag-[^ ]* ")
-)
-
-func TidyReduceCFlags(flags string) string {
- return removedCFlags.ReplaceAllString(flags, " ")
-}