From 61f2d11e75e910c898aedabbc9d3dbec6a9fc3da Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Tue, 16 Oct 2018 17:39:50 +0800 Subject: [PATCH] Remove flags from ClangLibToolingUnknownCflags This commit removes flags from ClangLibToolingUnknownCflags. These flags were added to workaround an old version of clang in `external/clang`. Since we have updated to clang-r339409b, we don't need these workaround anymore. Bug: 117764794 Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py Change-Id: Ifbeebf05df5c08ee3bb7d489f39250d8fd5f5acf --- cc/config/clang.go | 7 +------ cc/sabi.go | 11 ----------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/cc/config/clang.go b/cc/config/clang.go index 5cf24219e..b58223f09 100644 --- a/cc/config/clang.go +++ b/cc/config/clang.go @@ -92,12 +92,7 @@ var ClangUnknownLldflags = sorted([]string{ "-Wl,-m,aarch64_elf64_le_vec", }) -var ClangLibToolingUnknownCflags = []string{ - // Remove -flto and other flto dependent flags. - "-flto*", - "-fsanitize*", - "-fwhole-program-vtables", -} +var ClangLibToolingUnknownCflags []string = nil func init() { pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{ diff --git a/cc/sabi.go b/cc/sabi.go index 72a3c5c55..4a8649945 100644 --- a/cc/sabi.go +++ b/cc/sabi.go @@ -73,17 +73,6 @@ func (sabimod *sabi) flags(ctx ModuleContext, flags Flags) Flags { 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. - mappedArch := map[string]string{ - "exynos-m2": "cortex-a53", - "cortex-a55": "cortex-a53", - "cortex-a75": "cortex-a57", - } - if arch, ok := mappedArch[ctx.Arch().CpuVariant]; ok { - flags.ToolingCFlags = append(flags.ToolingCFlags, "-mcpu="+arch) - } - return flags }