Merge "Revert "Remove flags rejected by RBE input processor"" into main

This commit is contained in:
Pirama Arumuga Nainar
2023-11-21 23:45:12 +00:00
committed by Gerrit Code Review
2 changed files with 1 additions and 15 deletions

View File

@@ -681,16 +681,11 @@ func transformSourceToObj(ctx ModuleContext, subdir string, srcFiles, noTidySrcs
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

View File

@@ -16,7 +16,6 @@ package config
import (
"android/soong/android"
"regexp"
"strings"
)
@@ -281,11 +280,3 @@ func TidyFlagsForSrcFile(srcFile android.Path, flags string) string {
}
return flags
}
var (
removedCFlags = regexp.MustCompile(" -fsanitize=[^ ]*memtag-[^ ]* ")
)
func TidyReduceCFlags(flags string) string {
return removedCFlags.ReplaceAllString(flags, " ")
}