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
diff --git a/cc/config/x86_64_device.go b/cc/config/x86_64_device.go
index e43848c..ff0a3b7 100644
--- a/cc/config/x86_64_device.go
+++ b/cc/config/x86_64_device.go
@@ -49,6 +49,10 @@
"goldmont-plus": []string{
"-march=goldmont-plus",
},
+ "goldmont-without-xsaves": []string{
+ "-march=goldmont",
+ "-mno-xsaves",
+ },
"haswell": []string{
"-march=core-avx2",
},