From bf3dae64a21890ab1d63827de39a72b53ca6116e Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Sat, 21 Aug 2021 15:48:43 +0300 Subject: [PATCH] Android: fix toolchain path retrieval for NDK r10 Although, recent Qt versions (Qt 5.12+) don't really need r10, this can be useful if an older version is used, or if the user wants to explicitly use Ndk r10. Change-Id: Ic88929a747bcea89384a7bae9d8f8b26135fae65 Reviewed-by: Alessandro Portale --- src/plugins/android/androidconfigurations.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index 55ae9eeb060..194010dffad 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -473,7 +473,13 @@ FilePath AndroidConfig::avdManagerToolPath() const FilePath AndroidConfig::toolchainPathFromNdk(const Utils::FilePath &ndkLocation) const { - const FilePath toolchainPath = ndkLocation / "toolchains/llvm/prebuilt/"; + const FilePath tcPath = ndkLocation / "toolchains/"; + FilePath toolchainPath; + QDirIterator llvmIter(tcPath.toString(), {"llvm*"}, QDir::Dirs); + if (llvmIter.hasNext()) { + llvmIter.next(); + toolchainPath = tcPath / llvmIter.fileName() / "prebuilt/"; + } // detect toolchain host QStringList hostPatterns;