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 <bogdan@kde.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2014-10-30 16:16:01 +01:00
parent d3f3e1218c
commit ef25d2efdb

View File

@ -3302,13 +3302,9 @@ void Configure::generateQDevicePri()
deviceStream << entry << "\n"; deviceStream << entry << "\n";
} }
if (dictionary.contains("ANDROID_SDK_ROOT") && dictionary.contains("ANDROID_NDK_ROOT")) { 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 << "android_install {" << endl;
deviceStream << " DEFAULT_ANDROID_SDK_ROOT = " << formatPath(dictionary["ANDROID_SDK_ROOT"]) << 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_NDK_ROOT = " << formatPath(dictionary["ANDROID_NDK_ROOT"]) << endl;
deviceStream << " DEFAULT_ANDROID_PLATFORM = " << android_platform << endl;
if (QSysInfo::WordSize == 64) if (QSysInfo::WordSize == 64)
deviceStream << " DEFAULT_ANDROID_NDK_HOST = windows-x86_64" << endl; deviceStream << " DEFAULT_ANDROID_NDK_HOST = windows-x86_64" << endl;
else else
@ -3319,6 +3315,15 @@ void Configure::generateQDevicePri()
QString android_tc_vers(dictionary.contains("ANDROID_NDK_TOOLCHAIN_VERSION") QString android_tc_vers(dictionary.contains("ANDROID_NDK_TOOLCHAIN_VERSION")
? dictionary["ANDROID_NDK_TOOLCHAIN_VERSION"] ? dictionary["ANDROID_NDK_TOOLCHAIN_VERSION"]
: QString("4.9")); : 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_TARGET_ARCH = " << android_arch << endl;
deviceStream << " DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = " << android_tc_vers << endl; deviceStream << " DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION = " << android_tc_vers << endl;
deviceStream << "}" << endl; deviceStream << "}" << endl;