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
This commit is contained in:
Chih-Hung Hsieh
2018-08-22 14:18:04 -07:00
committed by Chih-hung Hsieh
parent cde4e89c27
commit 9e88ba9f22
4 changed files with 52 additions and 47 deletions

View File

@@ -71,6 +71,7 @@ func (sabimod *sabi) flags(ctx ModuleContext, flags Flags) Flags {
// Assuming that the cflags which clang LibTooling tools cannot
// understand have not been converted to ninja variables yet.
flags.ToolingCFlags = filterOutWithPrefix(flags.CFlags, config.ClangLibToolingUnknownCflags)
flags.ToolingCppFlags = filterOutWithPrefix(flags.CppFlags, config.ClangLibToolingUnknownCflags)
// RSClang does not support recent mcpu option likes exynos-m2.
// So we need overriding mcpu option when we want to use it.