Merge "[cc/sanitize] Add Blocklist property" am: eda8499a3c am: bb77ffc496 am: 296ae444b1

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1373516

Change-Id: I50e4ba01e4b5eed45c68f77253aee00f812fa68e
This commit is contained in:
Pirama Arumuga Nainar
2020-07-28 18:20:44 +00:00
committed by Automerger Merge Worker

View File

@@ -178,6 +178,8 @@ type SanitizeProperties struct {
// value to pass to -fsanitize-blacklist
Blacklist *string
// value to pass to -fsanitize-blacklist
Blocklist *string
} `android:"arch_variant"`
SanitizerEnabled bool `blueprint:"mutated"`
@@ -600,6 +602,12 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
flags.CFlagsDeps = append(flags.CFlagsDeps, blacklist.Path())
}
blocklist := android.OptionalPathForModuleSrc(ctx, sanitize.Properties.Sanitize.Blocklist)
if blocklist.Valid() {
flags.Local.CFlags = append(flags.Local.CFlags, "-fsanitize-blacklist="+blocklist.String())
flags.CFlagsDeps = append(flags.CFlagsDeps, blocklist.Path())
}
return flags
}