Merge "Add error message for unsupported x86 arch variant" am: 104ecf6708 am: baeeb601cc am: ca7d468a5d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980008

Change-Id: I02dff31376d00f8912036cb89956139fee9b60d6
This commit is contained in:
Treehugger Robot 2022-02-11 14:38:37 +00:00 committed by Automerger Merge Worker
commit ee18fb6589
2 changed files with 12 additions and 0 deletions

View file

@ -15,6 +15,7 @@
package config
import (
"fmt"
"strings"
"android/soong/android"
@ -190,6 +191,11 @@ func (toolchainX86_64) LibclangRuntimeLibraryArch() string {
}
func x86_64ToolchainFactory(arch android.Arch) Toolchain {
// Error now rather than having a confusing Ninja error
if _, ok := x86_64ArchVariantCflags[arch.ArchVariant]; !ok {
panic(fmt.Sprintf("Unknown x86_64 architecture version: %q", arch.ArchVariant))
}
toolchainCflags := []string{
"${config.X86_64ToolchainCflags}",
"${config.X86_64" + arch.ArchVariant + "VariantCflags}",

View file

@ -15,6 +15,7 @@
package config
import (
"fmt"
"strings"
"android/soong/android"
@ -186,6 +187,11 @@ func (toolchainX86) LibclangRuntimeLibraryArch() string {
}
func x86ToolchainFactory(arch android.Arch) Toolchain {
// Error now rather than having a confusing Ninja error
if _, ok := x86ArchVariantCflags[arch.ArchVariant]; !ok {
panic(fmt.Sprintf("Unknown x86 architecture version: %q", arch.ArchVariant))
}
toolchainCflags := []string{
"${config.X86ToolchainCflags}",
"${config.X86" + arch.ArchVariant + "VariantCflags}",