Fix Android x86 builds

Replace condition x86 to i386 to match other platforms.

Regenerate src/gui/CMakeLists.txt

Disable SSE4 on android x86 to match qmake.

Change-Id: Ic0d330206f2d70a79d72553aa3ff0f91ff58119c
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-11-07 15:03:33 +01:00
parent 6b193c88a7
commit 512aae3abe
4 changed files with 12 additions and 3 deletions

View File

@ -162,4 +162,13 @@ function(run_config_tests)
run_linker_version_script_support()
endfunction()
# The qmake build of android does not perform the right architecture tests and
# forcefully disables sse4 on android x86. We have to mimic this behavior
# for now
if (CMAKE_ANDROID_ARCH_ABI STREQUAL x86)
set(QT_FEATURE_sse4_1 OFF CACHE BOOL INTERNAL FORCE)
set(QT_FEATURE_sse4_2 OFF CACHE BOOL INTERNAL FORCE)
set(TEST_subarch_sse4_1 FALSE CACHE BOOL INTERNAL FORCE)
set(TEST_subarch_sse4_2 FALSE CACHE BOOL INTERNAL FORCE)
endif()
run_config_tests()

View File

@ -478,7 +478,7 @@ extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
painting/qimagescale_neon.cpp
)
extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL i386 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp

View File

@ -560,7 +560,7 @@ extend_target(Gui CONDITION ANDROID AND TEST_architecture_arch STREQUAL arm64
painting/qimagescale_neon.cpp
)
extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL x86 OR TEST_architecture_arch STREQUAL x86_64)
extend_target(Gui CONDITION ANDROID AND (TEST_architecture_arch STREQUAL i386 OR TEST_architecture_arch STREQUAL x86_64)
SOURCES
image/qimage_ssse3.cpp
painting/qdrawhelper_sse2.cpp

View File

@ -1281,7 +1281,7 @@ def map_condition(condition: str) -> str:
condition = condition.replace("|", " OR ")
# new conditions added by the android multi arch qmake build
condition = re.sub(r"(^| )x86([^\_]|$)", "TEST_architecture_arch STREQUAL x86", condition)
condition = re.sub(r"(^| )x86([^\_]|$)", "TEST_architecture_arch STREQUAL i386", condition)
condition = re.sub(r"(^| )x86_64", " TEST_architecture_arch STREQUAL x86_64", condition)
condition = re.sub(r"(^| )arm64-v8a", "TEST_architecture_arch STREQUAL arm64", condition)
condition = re.sub(r"(^| )armeabi-v7a", "TEST_architecture_arch STREQUAL arm", condition)