Merge changes I646f303b,I294ca692
* changes: Add support for Exynos-M2. Override mcpu option of ToolingCFlags when mcpu is eyxnos-m2.
This commit is contained in:
commit
99cd671ac3
4 changed files with 23 additions and 0 deletions
|
@ -879,10 +879,12 @@ func getMegaDeviceConfig() []archConfig {
|
|||
{"arm", "armv7-a-neon", "denver", []string{"armeabi-v7a"}},
|
||||
{"arm", "armv7-a-neon", "krait", []string{"armeabi-v7a"}},
|
||||
{"arm", "armv7-a-neon", "kryo", []string{"armeabi-v7a"}},
|
||||
{"arm", "armv7-a-neon", "exynos-m2", []string{"armeabi-v7a"}},
|
||||
{"arm64", "armv8-a", "cortex-a53", []string{"arm64-v8a"}},
|
||||
{"arm64", "armv8-a", "cortex-a73", []string{"arm64-v8a"}},
|
||||
{"arm64", "armv8-a", "denver64", []string{"arm64-v8a"}},
|
||||
{"arm64", "armv8-a", "kryo", []string{"arm64-v8a"}},
|
||||
{"arm64", "armv8-a", "exynos-m2", []string{"arm64-v8a"}},
|
||||
{"mips", "mips32-fp", "", []string{"mips"}},
|
||||
{"mips", "mips32r2-fp", "", []string{"mips"}},
|
||||
{"mips", "mips32r2-fp-xburst", "", []string{"mips"}},
|
||||
|
|
|
@ -81,6 +81,9 @@ var (
|
|||
// don't support a Kryo specific target yet.
|
||||
"-mcpu=cortex-a57",
|
||||
},
|
||||
"exynos-m2": []string{
|
||||
"-mcpu=exynos-m2",
|
||||
},
|
||||
}
|
||||
|
||||
arm64ClangCpuVariantCflags = copyVariantFlags(arm64CpuVariantCflags)
|
||||
|
@ -96,6 +99,7 @@ func init() {
|
|||
"cortex-a53",
|
||||
"cortex-a73",
|
||||
"kryo",
|
||||
"exynos-m2",
|
||||
"denver64")
|
||||
|
||||
// Clang supports specific Kryo targeting
|
||||
|
@ -124,6 +128,11 @@ func init() {
|
|||
strings.Join(arm64CpuVariantCflags["kryo"], " "))
|
||||
pctx.StaticVariable("Arm64ClangKryoCflags",
|
||||
strings.Join(arm64ClangCpuVariantCflags["kryo"], " "))
|
||||
|
||||
pctx.StaticVariable("Arm64ExynosM2Cflags",
|
||||
strings.Join(arm64CpuVariantCflags["cortex-a53"], " "))
|
||||
pctx.StaticVariable("Arm64ClangExynosM2Cflags",
|
||||
strings.Join(arm64ClangCpuVariantCflags["exynos-m2"], " "))
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -132,6 +141,7 @@ var (
|
|||
"cortex-a53": "${config.Arm64CortexA53Cflags}",
|
||||
"cortex-a73": "${config.Arm64CortexA53Cflags}",
|
||||
"kryo": "${config.Arm64KryoCflags}",
|
||||
"exynos-m2": "${config.Arm64ExynosM2Cflags}",
|
||||
}
|
||||
|
||||
arm64ClangCpuVariantCflagsVar = map[string]string{
|
||||
|
@ -139,6 +149,7 @@ var (
|
|||
"cortex-a53": "${config.Arm64ClangCortexA53Cflags}",
|
||||
"cortex-a73": "${config.Arm64ClangCortexA53Cflags}",
|
||||
"kryo": "${config.Arm64ClangKryoCflags}",
|
||||
"exynos-m2": "${config.Arm64ClangExynosM2Cflags}",
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ func init() {
|
|||
"cortex-a73",
|
||||
"krait",
|
||||
"kryo",
|
||||
"exynos-m2",
|
||||
"denver")
|
||||
|
||||
android.RegisterArchVariantFeatures(android.Arm, "armv7-a-neon", "neon")
|
||||
|
@ -274,6 +275,7 @@ var (
|
|||
"cortex-a73": "${config.ArmCortexA53Cflags}",
|
||||
"krait": "${config.ArmKraitCflags}",
|
||||
"kryo": "${config.ArmKryoCflags}",
|
||||
"exynos-m2": "${config.ArmCortexA53Cflags}",
|
||||
"denver": "${config.ArmCortexA15Cflags}",
|
||||
}
|
||||
|
||||
|
@ -293,6 +295,7 @@ var (
|
|||
"cortex-a73": "${config.ArmClangCortexA53Cflags}",
|
||||
"krait": "${config.ArmClangKraitCflags}",
|
||||
"kryo": "${config.ArmClangKryoCflags}",
|
||||
"exynos-m2": "${config.ArmClangCortexA53Cflags}",
|
||||
"denver": "${config.ArmClangCortexA15Cflags}",
|
||||
}
|
||||
)
|
||||
|
|
|
@ -67,6 +67,13 @@ 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)
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue