Override mcpu option of ToolingCFlags when mcpu is eyxnos-m2.
sAbiDumper uses one year old clang which does not support
recent mcpu options like exynos-m2.
So, we set mcpu=cortex-a53 for ToolingCFlags.
Change-Id: I294ca692181fd2cbc6ba5efb1e4e2d2d605b7a85
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
diff --git a/cc/sabi.go b/cc/sabi.go
index 318d198..1a5361d 100644
--- a/cc/sabi.go
+++ b/cc/sabi.go
@@ -67,6 +67,13 @@
// 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)
+
+ // 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")
+ }
+
return flags
}