diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-09-26 13:56:53 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-10-04 13:47:59 +0000 |
commit | 8d0b530cf1b8872d4c5bcc315d98f8997f00d46c (patch) | |
tree | 9f0ed11ad22ec68356deabc2a78d5e56d689a08e /share | |
parent | 75d82f328865e37f1effe9ec8387cb4459600c72 (diff) |
Android: match default NDK behavior
Unified Headers were introduced in r14 but only became default in r15.
So enable them by default if the NDK version is >= r15. Users can
manually set the property to use them with NDK r14. Only unified headers
are supported in NDK r16+ as the legacy headers are removed.
In NDK r16, the default ABI is armv7a and armv5te is deprecated and no
longer builds by default. We can't actually check the NDK version in the
qbs module due to limitations in Qbs, so we'll just use armv7a as the
global default as it has been available and been a suitable default for
a long time now.
In NDK r17, the default STL will be libc++. Set Android.ndk.appStl to
libc++_shared by default in r17 and above.
Change-Id: If0a5a60af3ceb483d0614f88dca63c7d66d52b52
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/Android/ndk/ndk.qbs | 4 | ||||
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/share/qbs/modules/Android/ndk/ndk.qbs b/share/qbs/modules/Android/ndk/ndk.qbs index 788fba50d..b347971f3 100644 --- a/share/qbs/modules/Android/ndk/ndk.qbs +++ b/share/qbs/modules/Android/ndk/ndk.qbs @@ -52,7 +52,7 @@ Module { allowedValues: ["arm64-v8a", "armeabi", "armeabi-v7a", "mips", "mips64", "x86", "x86_64"] } - property string appStl: "system" + property string appStl: Utilities.versionCompare(version, "17") >= 0 ? "c++_shared" : "system" PropertyOptions { name: "appStl" description: "Corresponds to the 'APP_STL' variable in an Android.mk file." @@ -75,7 +75,7 @@ Module { ? "android-14" : "android-9" - property bool useUnifiedHeaders: Utilities.versionCompare(version, "14") >= 0 + property bool useUnifiedHeaders: Utilities.versionCompare(version, "15") >= 0 // Internal properties. property stringList availableToolchains: ndkProbe.toolchains diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index 262a44317..ade3fd2c2 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -215,7 +215,7 @@ Module { property stringList profiles property stringList architectures: { if (targetOS.contains("android")) - return ["armv5te"]; + return ["armv7a"]; // default should be armv5te for NDK < r16, but we can't check here if (targetOS.contains("ios-simulator")) return ["x86", "x86_64"]; if (targetOS.contains("ios")) |