From 3db14b5bd38001eea3e61009c2b7c108eced54dc Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 19 Aug 2019 11:42:51 +0300 Subject: Say hello to -android-abis configure param This configure parameter is useful to compile Qt only for a selected ABIs. The old parameter, -android-arch, does the same thing, it's kept for compatibility. [ChangeLog][Android] -android-abis configure script parameter useful to compile Qt only for a selected Android ABIs. Change-Id: I1f418c7e0914dd83b98d763e8cd8c09841e20fdf Reviewed-by: Eskil Abrahamsen Blomfeldt --- config_help.txt | 4 ++-- configure.json | 1 + configure.pri | 11 ++++++----- mkspecs/android-clang/qmake.conf | 4 +++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/config_help.txt b/config_help.txt index 3f31fd351f..5880c1e00d 100644 --- a/config_help.txt +++ b/config_help.txt @@ -203,8 +203,8 @@ Build environment: -android-ndk-platform Set Android platform -android-ndk-host .... Set Android NDK host (linux-x86, linux-x86_64, etc.) [$ANDROID_NDK_HOST] - -android-arch ........ Set Android architecture (armeabi, armeabi-v7a, - arm64-v8a, x86, x86_64) + -android-abis ....... Comma separated Android abis, default is: + armeabi-v7a,arm64-v8a,x86,x86_64 -android-toolchain-version ... Set Android toolchain version -android-style-assets Automatically extract style assets from the device at run time. This option makes the Android style behave diff --git a/configure.json b/configure.json index 6a7b5924cd..c6ea80b076 100644 --- a/configure.json +++ b/configure.json @@ -51,6 +51,7 @@ "translationdir": "string", "android-arch": "string", + "android-abis": "string", "android-ndk": "string", "android-ndk-host": "string", "android-ndk-platform": "string", diff --git a/configure.pri b/configure.pri index cbd11c2f67..d803dcf086 100644 --- a/configure.pri +++ b/configure.pri @@ -618,10 +618,11 @@ defineTest(qtConfOutput_prepareOptions) { qtConfFatalError("Specified Android NDK host is invalid.") } - target_arch = $$eval(config.input.android-arch) - isEmpty(target_arch): \ - target_arch = armeabi-v7a - + android_abis = $$eval(config.input.android-abis) + isEmpty(android_abis): \ + android_abis = $$eval(config.input.android-arch) + isEmpty(android_abis): \ + android_abis = armeabi-v7a,arm64-v8a,x86,x86_64 platform = $$eval(config.input.android-ndk-platform) isEmpty(platform): \ platform = android-21 @@ -631,7 +632,7 @@ defineTest(qtConfOutput_prepareOptions) { "DEFAULT_ANDROID_NDK_ROOT = $$val_escape(ndk_root)" \ "DEFAULT_ANDROID_PLATFORM = $$platform" \ "DEFAULT_ANDROID_NDK_HOST = $$ndk_host" \ - "DEFAULT_ANDROID_TARGET_ARCH = $$target_arch" \ + "DEFAULT_ANDROID_ABIS = $$split(android_abis, ',')" \ "DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = $$ndk_tc_ver" } diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf index 8252f400a1..21847cdc7c 100644 --- a/mkspecs/android-clang/qmake.conf +++ b/mkspecs/android-clang/qmake.conf @@ -37,7 +37,9 @@ isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) { } } -ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86 +ALL_ANDROID_ABIS = $$(ALL_ANDROID_ABIS) +isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = $$DEFAULT_ANDROID_ABIS +isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86 CONFIG += $$ANDROID_PLATFORM -- cgit v1.2.3