[cc/sanitize] Add Blocklist property
This will eventually replace the Blacklist property.
Update language to comply with Android’s inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for
reference
Bug: 161896447
Bug: 162245450
Test: build topic
Change-Id: I3c2609c791c27b8ba3bcb55f79304b78bce1f518
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 72ad6d7..f9a8b11 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -174,6 +174,8 @@
// value to pass to -fsanitize-blacklist
Blacklist *string
+ // value to pass to -fsanitize-blacklist
+ Blocklist *string
} `android:"arch_variant"`
SanitizerEnabled bool `blueprint:"mutated"`
@@ -596,6 +598,12 @@
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
}