r272413 - Strip Android version when looking up toolchain paths.
Josh Gao via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 11 01:22:59 PDT 2016
Sorry, I got some other buildbot failure emails in which the test didn't
fail, and I assumed they were all the same. I'll be more careful in the
future.
-Josh
On Jun 10, 2016 10:04 PM, "Chandler Carruth" <chandlerc at gmail.com> wrote:
> This broke several bots that have now been red most of the day. Here are
> recent builds that show the failure:
> http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/4611
> http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/6331
> http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/15622
>
> I suspect this is because using PATH in this way as part of a test doesn't
> work well, but I'll let you look at what the best option is for fixing
> this. For now I've reverted it in
>
> Please watch the bots when committing in the future.
>
> -Chandler
>
> On Fri, Jun 10, 2016 at 11:37 AM Josh Gao via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: jmgao
>> Date: Fri Jun 10 13:30:33 2016
>> New Revision: 272413
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=272413&view=rev
>> Log:
>> Strip Android version when looking up toolchain paths.
>>
>> Summary:
>> Android target triples can include a version number in the abi field
>> (e.g. 'aarch64-linux-android21'), used for checking for availability.
>> However, the driver was searching for toolchain binaries using the
>> passed in triple as a prefix.
>>
>> Reviewers: srhines, danalbert, t.p.northover
>>
>> Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines,
>> cfe-commits
>>
>> Differential Revision: http://reviews.llvm.org/D21163
>>
>> Added:
>> cfe/trunk/test/Driver/Inputs/android_triple_version/
>> cfe/trunk/test/Driver/Inputs/android_triple_version/bin/
>>
>> cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld
>> (with props)
>>
>> cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe
>> (with props)
>> 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=272413&r1=272412&r2=272413&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/Driver.cpp (original)
>> +++ cfe/trunk/lib/Driver/Driver.cpp Fri Jun 10 13:30:33 2016
>> @@ -2343,7 +2343,15 @@ void Driver::generatePrefixedToolNames(
>> const char *Tool, const ToolChain &TC,
>> SmallVectorImpl<std::string> &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.
>>
>> Added:
>> 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=272413&view=auto
>>
>> ==============================================================================
>> (empty)
>>
>> Propchange:
>> cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld
>>
>> ------------------------------------------------------------------------------
>> svn:executable = *
>>
>> Added:
>> 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=272413&view=auto
>>
>> ==============================================================================
>> (empty)
>>
>> Propchange:
>> cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe
>>
>> ------------------------------------------------------------------------------
>> svn:executable = *
>>
>> Added: cfe/trunk/test/Driver/android-triple-version.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/android-triple-version.c?rev=272413&view=auto
>>
>> ==============================================================================
>> --- cfe/trunk/test/Driver/android-triple-version.c (added)
>> +++ cfe/trunk/test/Driver/android-triple-version.c Fri Jun 10 13:30:33
>> 2016
>> @@ -0,0 +1,10 @@
>> +// 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
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160611/8363f453/attachment-0001.html>
More information about the cfe-commits
mailing list