Black-list for clang LibTooling Cflags.
Add a list of flags which are not understood by clang LibTooling tools
and filter them out of the Cflags the tools are invoked with.
Test: In frameworks/av, make libmedia vendor_available (this invokes
header-abi-dumper on this module), mm -j64.
Bug: 62447349
Change-Id: I46f017212b89f4331145c999103d0ed44da0abaf
diff --git a/cc/config/clang.go b/cc/config/clang.go
index 3ff6b1b..977afe1 100644
--- a/cc/config/clang.go
+++ b/cc/config/clang.go
@@ -65,6 +65,11 @@
"-mbionic",
})
+var ClangLibToolingUnknownCflags = []string{
+ "-flto",
+ "-fsanitize*",
+}
+
func init() {
pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{
"-D__compiler_offsetof=__builtin_offsetof",