From ef25d2efdbc74cd334f010649f1c155be529235d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 30 Oct 2014 16:16:01 +0100 Subject: Android: Enable 64-bit configuration on Windows host platform Default to android-21 when a 64-bit target is chosen, as this is the lowest API level supported for 64-bit targets. Change-Id: If4ece23911c3e9e45558906d970ef85a3b18b0bb Reviewed-by: BogDan Vatra --- tools/configure/configureapp.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6802a49fc9..bb7b83cd47 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3302,13 +3302,9 @@ void Configure::generateQDevicePri() deviceStream << entry << "\n"; } if (dictionary.contains("ANDROID_SDK_ROOT") && dictionary.contains("ANDROID_NDK_ROOT")) { - QString android_platform(dictionary.contains("ANDROID_PLATFORM") - ? dictionary["ANDROID_PLATFORM"] - : QString("android-9")); deviceStream << "android_install {" << endl; deviceStream << " DEFAULT_ANDROID_SDK_ROOT = " << formatPath(dictionary["ANDROID_SDK_ROOT"]) << endl; deviceStream << " DEFAULT_ANDROID_NDK_ROOT = " << formatPath(dictionary["ANDROID_NDK_ROOT"]) << endl; - deviceStream << " DEFAULT_ANDROID_PLATFORM = " << android_platform << endl; if (QSysInfo::WordSize == 64) deviceStream << " DEFAULT_ANDROID_NDK_HOST = windows-x86_64" << endl; else @@ -3319,6 +3315,15 @@ void Configure::generateQDevicePri() QString android_tc_vers(dictionary.contains("ANDROID_NDK_TOOLCHAIN_VERSION") ? dictionary["ANDROID_NDK_TOOLCHAIN_VERSION"] : QString("4.9")); + + bool targetIs64Bit = android_arch == QString("arm64-v8a") + || android_arch == QString("x86_64") + || android_arch == QString("mips64"); + QString android_platform(dictionary.contains("ANDROID_PLATFORM") + ? dictionary["ANDROID_PLATFORM"] + : (targetIs64Bit ? QString("android-21") : QString("android-9"))); + + deviceStream << " DEFAULT_ANDROID_PLATFORM = " << android_platform << endl; deviceStream << " DEFAULT_ANDROID_TARGET_ARCH = " << android_arch << endl; deviceStream << " DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = " << android_tc_vers << endl; deviceStream << "}" << endl; -- cgit v1.2.3