r272454 - Revert "Strip Android version when looking up toolchain paths."

Chandler Carruth via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 21:57:30 PDT 2016


Author: chandlerc
Date: Fri Jun 10 23:57:29 2016
New Revision: 272454

URL: http://llvm.org/viewvc/llvm-project?rev=272454&view=rev
Log:
Revert "Strip Android version when looking up toolchain paths."

This reverts commit r272413. The tests here have been failing on several
different build bots for over 10 hours.

Removed:
    cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld
    cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe
    cfe/trunk/test/Driver/android-triple-version.c
Modified:
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=272454&r1=272453&r2=272454&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Jun 10 23:57:29 2016
@@ -2343,15 +2343,7 @@ void Driver::generatePrefixedToolNames(
     const char *Tool, const ToolChain &TC,
     SmallVectorImpl<std::string> &Names) const {
   // FIXME: Needs a better variable than DefaultTargetTriple
-  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(DefaultTargetTriple + "-" + Tool);
   Names.emplace_back(Tool);
 
   // Allow the discovery of tools prefixed with LLVM's default target triple.

Removed: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld?rev=272453&view=auto
==============================================================================
    (empty)

Removed: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe?rev=272453&view=auto
==============================================================================
    (empty)

Removed: cfe/trunk/test/Driver/android-triple-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/android-triple-version.c?rev=272453&view=auto
==============================================================================
--- cfe/trunk/test/Driver/android-triple-version.c (original)
+++ cfe/trunk/test/Driver/android-triple-version.c (removed)
@@ -1,10 +0,0 @@
-// Android's target triples can contain a version number in the environment
-// field (e.g. arm-linux-androideabi9).
-// Make sure that any version is stripped when finding toolchain binaries.
-
-// RUN: env "PATH=%S/Inputs/android_triple_version/bin" \
-// RUN:     %clang -### -target arm-linux-androideabi %s 2>&1 | FileCheck %s
-// RUN: env "PATH=%S/Inputs/android_triple_version/bin" \
-// RUN:     %clang -### -target arm-linux-androideabi9 %s 2>&1 | FileCheck %s
-
-// CHECK: arm-linux-androideabi-ld




More information about the cfe-commits mailing list