Add support for 64-bit NDKs to Android Plugin.

Currently the Android plugin only checks for the linux-x86 prebuilds in the
64-bit Android NDK (and mingw-and-ndk), this means Qt Creator goes bonkers
because it can't find the toolchain and debugger for the kits it
auto-detects/creates.

A work around is to symlink linux-x86_64 to linux-x86 in every toolchain.

Change-Id: I04522b65ef48b6090a9f6925e8e3420ad1d333ee
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Guillermo A. Amaral
2013-04-04 01:29:47 -07:00
parent 8139d43c29
commit 6a6f3d2a53
5 changed files with 46 additions and 49 deletions

View File

@@ -111,21 +111,7 @@ void AndroidToolChain::addToEnvironment(Environment &env) const
// TODO this vars should be configurable in projects -> build tab
// TODO invalidate all .pro files !!!
QString ndkHost;
switch (HostOsInfo::hostOs()) {
case HostOsInfo::HostOsLinux:
ndkHost = QLatin1String("linux-x86");
break;
case HostOsInfo::HostOsWindows:
ndkHost = QLatin1String("windows");
break;
case HostOsInfo::HostOsMac:
ndkHost = QLatin1String("darwin-x86");
break;
default:
break;
}
env.set(QLatin1String("ANDROID_NDK_HOST"), ndkHost);
env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::instance().config().toolchainHost);
env.set(QLatin1String("ANDROID_NDK_TOOLCHAIN_PREFIX"), AndroidConfigurations::toolchainPrefix(targetAbi().architecture()));
env.set(QLatin1String("ANDROID_NDK_TOOLS_PREFIX"), AndroidConfigurations::toolsPrefix(targetAbi().architecture()));
env.set(QLatin1String("ANDROID_NDK_TOOLCHAIN_VERSION"), m_ndkToolChainVersion);
@@ -302,12 +288,7 @@ QList<AndroidToolChainFactory::AndroidToolChainInformation> AndroidToolChainFact
if (ati.architecture == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
continue;
// AndroidToolChain *tc = new AndroidToolChain(arch, version, true);
ati.compilerCommand = ndkPath;
ati.compilerCommand.appendPath(QString::fromLatin1("toolchains/%1/prebuilt/%3/bin/%4")
.arg(fileName)
.arg(ToolchainHost)
.arg(AndroidConfigurations::toolsPrefix(ati.architecture)));
ati.compilerCommand.append(QLatin1String("-gcc" QTC_HOST_EXE_SUFFIX));
ati.compilerCommand = AndroidConfigurations::instance().gccPath(ati.architecture, ati.version);
// tc->setCompilerCommand(compilerPath);
result.append(ati);
}
@@ -334,12 +315,7 @@ QList<ToolChain *> AndroidToolChainFactory::createToolChainsForNdk(const Utils::
if (arch == Abi::UnknownArchitecture) // e.g. mipsel which is not yet supported
continue;
AndroidToolChain *tc = new AndroidToolChain(arch, version, true);
FileName compilerPath = ndkPath;
compilerPath.appendPath(QString::fromLatin1("toolchains/%1/prebuilt/%3/bin/%4")
.arg(fileName)
.arg(ToolchainHost)
.arg(AndroidConfigurations::toolsPrefix(arch)));
compilerPath.append(QLatin1String("-gcc" QTC_HOST_EXE_SUFFIX));
FileName compilerPath = AndroidConfigurations::instance().gccPath(arch, version);
tc->setCompilerCommand(compilerPath);
result.append(tc);
}