Android: don't use avx and avx2 when building for Android x86_64

The Android build for x86_64 fails with CMake. It should also fail with
qmake builds but the current multi-ABI build is testing the feature for
arm64-v8a only.

In [1], it's stated that AVX and AVX2 are not supported on x86_64 ABI.

[1] https://developer.android.com/ndk/guides/abis#86-64

Task-number: QTBUG-85982
Change-Id: I20c9366bdee2a13ca554ec67f5d0c041bd068b91
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Assam Boudjelthia 2020-09-08 17:47:28 +03:00
parent 54c37146b7
commit ff1a44be33
2 changed files with 4 additions and 4 deletions

View File

@ -676,7 +676,7 @@ qt_feature_definition("sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1")
qt_feature_config("sse4_2" QMAKE_PRIVATE_CONFIG)
qt_feature("avx"
LABEL "AVX"
CONDITION QT_FEATURE_sse4_2 AND TEST_subarch_avx
CONDITION QT_FEATURE_sse4_2 AND TEST_subarch_avx AND (NOT ANDROID OR NOT TEST_architecture_arch STREQUAL x86_64)
)
qt_feature_definition("avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1")
qt_feature_config("avx" QMAKE_PRIVATE_CONFIG)
@ -688,7 +688,7 @@ qt_feature_definition("f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1")
qt_feature_config("f16c" QMAKE_PRIVATE_CONFIG)
qt_feature("avx2" PRIVATE
LABEL "AVX2"
CONDITION QT_FEATURE_avx AND TEST_subarch_avx2
CONDITION QT_FEATURE_avx AND TEST_subarch_avx2 AND (NOT ANDROID OR NOT TEST_architecture_arch STREQUAL x86_64)
)
qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
qt_feature_config("avx2" QMAKE_PRIVATE_CONFIG)

View File

@ -1084,7 +1084,7 @@
},
"avx": {
"label": "AVX",
"condition": "features.sse4_2 && tests.avx",
"condition": "features.sse4_2 && tests.avx && (!config.android || !arch.x86_64)",
"output": [
"privateConfig",
{ "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX", "value": 1 }
@ -1100,7 +1100,7 @@
},
"avx2": {
"label": "AVX2",
"condition": "features.avx && tests.avx2",
"condition": "features.avx && tests.avx2 && (!config.android || !arch.x86_64)",
"output": [
"privateConfig",
"privateFeature",