[cc] Switch to -fsanitize-ignorelist

Upstream added this flag to replace -fsanitize-blacklist.

Test: presubmit
Change-Id: Iad6a1ac47b3a5693ed2107f491cbb36ac9f630ff
This commit is contained in:
Pirama Arumuga Nainar 2021-08-27 15:12:56 -07:00
parent cc1990f564
commit 582fc2d1dd
2 changed files with 5 additions and 5 deletions

View file

@ -316,7 +316,7 @@ func categorizeParameter(parameter string) parameterType {
if strings.HasPrefix(parameter, "--sysroot") {
return systemRoot
}
if strings.HasPrefix(parameter, "-fsanitize-blacklist") {
if strings.HasPrefix(parameter, "-fsanitize-ignorelist") {
return relativeFilePathFlag
}
if strings.HasPrefix(parameter, "-fprofile-sample-use") {

View file

@ -56,7 +56,7 @@ var (
}
cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso",
"-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blocklist.txt"}
"-fsanitize-ignorelist=external/compiler-rt/lib/cfi/cfi_blocklist.txt"}
// -flto and -fvisibility are required by clang when -fsanitize=cfi is
// used, but have no effect on assembly files
cfiAsflags = []string{"-flto", "-fvisibility=default"}
@ -64,7 +64,7 @@ var (
"-Wl,-plugin-opt,O1"}
cfiExportsMapPath = "build/soong/cc/config/cfi_exports.map"
intOverflowCflags = []string{"-fsanitize-blacklist=build/soong/cc/config/integer_overflow_blocklist.txt"}
intOverflowCflags = []string{"-fsanitize-ignorelist=build/soong/cc/config/integer_overflow_blocklist.txt"}
minimalRuntimeFlags = []string{"-fsanitize-minimal-runtime", "-fno-sanitize-trap=integer,undefined",
"-fno-sanitize-recover=integer,undefined"}
@ -260,7 +260,7 @@ type SanitizeUserProps struct {
// the first one
Recover []string
// value to pass to -fsanitize-blacklist
// value to pass to -fsanitize-ignorelist
Blocklist *string
}
@ -756,7 +756,7 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
blocklist := android.OptionalPathForModuleSrc(ctx, sanitize.Properties.Sanitize.Blocklist)
if blocklist.Valid() {
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-blacklist="+blocklist.String())
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-ignorelist="+blocklist.String())
flags.CFlagsDeps = append(flags.CFlagsDeps, blocklist.Path())
}