Fix unused-command-line-argument warning
Limit -msse2 and -mpopcnt flags to x86/x86_64 linux targets only.
Test: build
Bug: 197177755
Change-Id: Ia213f0a8bb836e765822a68770e2fee6407c1bcd
diff --git a/build/Android.bp b/build/Android.bp
index 21858db..34f11fe 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -211,13 +211,23 @@
// Bug: 15446488. We don't omit the frame pointer to work around
// clang/libunwind bugs that cause SEGVs in run-test-004-ThreadStress.
"-fno-omit-frame-pointer",
- // The build assumes that all our x86/x86_64 hosts (such as buildbots and developer
- // desktops) support at least sse4.2/popcount. This firstly implies that the ART
- // runtime binary itself may exploit these features. Secondly, this implies that
- // the ART runtime passes these feature flags to dex2oat and JIT by calling the
- // method InstructionSetFeatures::FromCppDefines(). Since invoking dex2oat directly
- // does not pick up these flags, cross-compiling from a x86/x86_64 host to a
- // x86/x86_64 target should not be affected.
+ ],
+ },
+ // The build assumes that all our x86/x86_64 hosts (such as buildbots and developer
+ // desktops) support at least sse4.2/popcount. This firstly implies that the ART
+ // runtime binary itself may exploit these features. Secondly, this implies that
+ // the ART runtime passes these feature flags to dex2oat and JIT by calling the
+ // method InstructionSetFeatures::FromCppDefines(). Since invoking dex2oat directly
+ // does not pick up these flags, cross-compiling from a x86/x86_64 host to a
+ // x86/x86_64 target should not be affected.
+ linux_x86: {
+ cflags: [
+ "-msse4.2",
+ "-mpopcnt",
+ ],
+ },
+ linux_x86_64: {
+ cflags: [
"-msse4.2",
"-mpopcnt",
],