Index: lib/Driver/Driver.cpp =================================================================== --- lib/Driver/Driver.cpp +++ lib/Driver/Driver.cpp @@ -2283,7 +2283,15 @@ const char *Tool, const ToolChain &TC, SmallVectorImpl &Names) const { // FIXME: Needs a better variable than DefaultTargetTriple - Names.emplace_back(DefaultTargetTriple + "-" + Tool); + StringRef Triple = DefaultTargetTriple; + + // On Android, the target triple can include a version number that needs to + // be stripped. + if (TC.getTriple().isAndroid()) { + Triple = Triple.rtrim("0123456789"); + } + + Names.emplace_back((Triple + "-" + Tool).str()); Names.emplace_back(Tool); // Allow the discovery of tools prefixed with LLVM's default target triple.