Remove flto dependent flags when -flto is removed.
* C++ source files could be compiled with "-fwhole-program-vtables"
in cppflags. We need to filter out those flto dependent flags
in flags.CppFlags and use flags.toolingCppFlags instead of
flags.cppFlags.
Test: build with WITH_TIDY=1
Change-Id: Ic2b0f99b95a5f0422f879226e6f6060cab71456a
diff --git a/cc/config/clang.go b/cc/config/clang.go
index 36afc68..186d790 100644
--- a/cc/config/clang.go
+++ b/cc/config/clang.go
@@ -93,8 +93,10 @@
})
var ClangLibToolingUnknownCflags = []string{
+ // Remove -flto and other flto dependent flags.
"-flto*",
"-fsanitize*",
+ "-fwhole-program-vtables",
}
func init() {