From 72f9a0b2f5352b7499e44e8551ae3a827730d340 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Thu, 14 Jun 2018 18:43:09 -0700 Subject: [PATCH] Update ToolingCFlags overrides to include other new architectures Bug: 110235326 Test: m checkbuild Change-Id: I9d0ada05d95bb260500c1d694332a73363b0f299 --- cc/sabi.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cc/sabi.go b/cc/sabi.go index f5a7c774d..42b2f3524 100644 --- a/cc/sabi.go +++ b/cc/sabi.go @@ -74,8 +74,13 @@ func (sabimod *sabi) flags(ctx ModuleContext, flags Flags) Flags { // RSClang does not support recent mcpu option likes exynos-m2. // So we need overriding mcpu option when we want to use it. - if ctx.Arch().CpuVariant == "exynos-m2" { - flags.ToolingCFlags = append(flags.ToolingCFlags, "-mcpu=cortex-a53") + 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