Remove flags rejected by RBE input processor
* This is a temporary work around until the RBE input processor
can handle those flags.
* It's okay to remove some cflags in clang-tidy command
if they do not affect tidy check results.
Bug: 248371171
Test: enable RBE; RBE_CLANG_TIDY_EXEC_STRATEGY=remote; make tidy-soong_subset
Change-Id: If499bd7e1f0f89ccc3b7f7df7d67cfc64dc67028
diff --git a/cc/config/tidy.go b/cc/config/tidy.go
index 23bda66..af49e88 100644
--- a/cc/config/tidy.go
+++ b/cc/config/tidy.go
@@ -16,6 +16,7 @@
import (
"android/soong/android"
+ "regexp"
"strings"
)
@@ -237,3 +238,11 @@
}
return flags
}
+
+var (
+ removedCFlags = regexp.MustCompile(" -fsanitize=[^ ]*memtag-[^ ]* ")
+)
+
+func TidyReduceCFlags(flags string) string {
+ return removedCFlags.ReplaceAllString(flags, " ")
+}