Add a new x86(_64) arch variant "goldmont-without-xsaves"
Its target arch is goldmont, but without xsaves support. This ensures efficient execution on a broad range of Intel/AMD CPUs used in Chromebooks, including those lacking xsaves support. (e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series) Bug: 314243939 Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-xsaves Change-Id: I9963cc3356394815f068fc998a9708bdb30c8266
This commit is contained in:
@@ -28,15 +28,16 @@ var (
|
||||
x86_64LinkFlags = []string{}
|
||||
|
||||
x86_64ArchVariantRustFlags = map[string][]string{
|
||||
"": []string{},
|
||||
"broadwell": []string{"-C target-cpu=broadwell"},
|
||||
"goldmont": []string{"-C target-cpu=goldmont"},
|
||||
"goldmont-plus": []string{"-C target-cpu=goldmont-plus"},
|
||||
"haswell": []string{"-C target-cpu=haswell"},
|
||||
"ivybridge": []string{"-C target-cpu=ivybridge"},
|
||||
"sandybridge": []string{"-C target-cpu=sandybridge"},
|
||||
"silvermont": []string{"-C target-cpu=silvermont"},
|
||||
"skylake": []string{"-C target-cpu=skylake"},
|
||||
"": []string{},
|
||||
"broadwell": []string{"-C target-cpu=broadwell"},
|
||||
"goldmont": []string{"-C target-cpu=goldmont"},
|
||||
"goldmont-plus": []string{"-C target-cpu=goldmont-plus"},
|
||||
"goldmont-without-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-xsaves"},
|
||||
"haswell": []string{"-C target-cpu=haswell"},
|
||||
"ivybridge": []string{"-C target-cpu=ivybridge"},
|
||||
"sandybridge": []string{"-C target-cpu=sandybridge"},
|
||||
"silvermont": []string{"-C target-cpu=silvermont"},
|
||||
"skylake": []string{"-C target-cpu=skylake"},
|
||||
//TODO: Add target-cpu=stoneyridge when rustc supports it.
|
||||
"stoneyridge": []string{""},
|
||||
"tremont": []string{"-C target-cpu=tremont"},
|
||||
|
@@ -26,16 +26,17 @@ var (
|
||||
x86LinkFlags = []string{}
|
||||
|
||||
x86ArchVariantRustFlags = map[string][]string{
|
||||
"": []string{},
|
||||
"atom": []string{"-C target-cpu=atom"},
|
||||
"broadwell": []string{"-C target-cpu=broadwell"},
|
||||
"goldmont": []string{"-C target-cpu=goldmont"},
|
||||
"goldmont-plus": []string{"-C target-cpu=goldmont-plus"},
|
||||
"haswell": []string{"-C target-cpu=haswell"},
|
||||
"ivybridge": []string{"-C target-cpu=ivybridge"},
|
||||
"sandybridge": []string{"-C target-cpu=sandybridge"},
|
||||
"silvermont": []string{"-C target-cpu=silvermont"},
|
||||
"skylake": []string{"-C target-cpu=skylake"},
|
||||
"": []string{},
|
||||
"atom": []string{"-C target-cpu=atom"},
|
||||
"broadwell": []string{"-C target-cpu=broadwell"},
|
||||
"goldmont": []string{"-C target-cpu=goldmont"},
|
||||
"goldmont-plus": []string{"-C target-cpu=goldmont-plus"},
|
||||
"goldmont-without-xsaves": []string{"-C target-cpu=goldmont", "-C target-feature=-xsaves"},
|
||||
"haswell": []string{"-C target-cpu=haswell"},
|
||||
"ivybridge": []string{"-C target-cpu=ivybridge"},
|
||||
"sandybridge": []string{"-C target-cpu=sandybridge"},
|
||||
"silvermont": []string{"-C target-cpu=silvermont"},
|
||||
"skylake": []string{"-C target-cpu=skylake"},
|
||||
//TODO: Add target-cpu=stoneyridge when rustc supports it.
|
||||
"stoneyridge": []string{""},
|
||||
"tremont": []string{"-C target-cpu=tremont"},
|
||||
|
Reference in New Issue
Block a user