<p dir="ltr">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.</p>
<p dir="ltr">-Josh</p>
<div class="gmail_quote">On Jun 10, 2016 10:04 PM, "Chandler Carruth" <<a href="mailto:chandlerc@gmail.com">chandlerc@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This broke several bots that have now been red most of the day. Here are recent builds that show the failure:<div><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/4611" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/4611</a><br></div><div><a href="http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/6331" target="_blank">http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/6331</a><br></div><div><a href="http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/15622" target="_blank">http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/15622</a><br></div><div><br></div><div>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<div><br></div><div><div>Please watch the bots when committing in the future.<br><br>-Chandler</div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 10, 2016 at 11:37 AM Josh Gao via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jmgao<br>
Date: Fri Jun 10 13:30:33 2016<br>
New Revision: 272413<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=272413&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=272413&view=rev</a><br>
Log:<br>
Strip Android version when looking up toolchain paths.<br>
<br>
Summary:<br>
Android target triples can include a version number in the abi field<br>
(e.g. 'aarch64-linux-android21'), used for checking for availability.<br>
However, the driver was searching for toolchain binaries using the<br>
passed in triple as a prefix.<br>
<br>
Reviewers: srhines, danalbert, t.p.northover<br>
<br>
Subscribers: t.p.northover, aemerson, tberghammer, danalbert, srhines, cfe-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D21163" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21163</a><br>
<br>
Added:<br>
cfe/trunk/test/Driver/Inputs/android_triple_version/<br>
cfe/trunk/test/Driver/Inputs/android_triple_version/bin/<br>
cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld (with props)<br>
cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe (with props)<br>
cfe/trunk/test/Driver/android-triple-version.c<br>
Modified:<br>
cfe/trunk/lib/Driver/Driver.cpp<br>
<br>
Modified: cfe/trunk/lib/Driver/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=272413&r1=272412&r2=272413&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=272413&r1=272412&r2=272413&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Driver.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Jun 10 13:30:33 2016<br>
@@ -2343,7 +2343,15 @@ void Driver::generatePrefixedToolNames(<br>
const char *Tool, const ToolChain &TC,<br>
SmallVectorImpl<std::string> &Names) const {<br>
// FIXME: Needs a better variable than DefaultTargetTriple<br>
- Names.emplace_back(DefaultTargetTriple + "-" + Tool);<br>
+ StringRef Triple = DefaultTargetTriple;<br>
+<br>
+ // On Android, the target triple can include a version number that needs to<br>
+ // be stripped.<br>
+ if (TC.getTriple().isAndroid()) {<br>
+ Triple = Triple.rtrim("0123456789");<br>
+ }<br>
+<br>
+ Names.emplace_back((Triple + "-" + Tool).str());<br>
Names.emplace_back(Tool);<br>
<br>
// Allow the discovery of tools prefixed with LLVM's default target triple.<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld?rev=272413&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld?rev=272413&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Propchange: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld<br>
------------------------------------------------------------------------------<br>
svn:executable = *<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe?rev=272413&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe?rev=272413&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Propchange: cfe/trunk/test/Driver/Inputs/android_triple_version/bin/arm-linux-androideabi-ld.exe<br>
------------------------------------------------------------------------------<br>
svn:executable = *<br>
<br>
Added: cfe/trunk/test/Driver/android-triple-version.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/android-triple-version.c?rev=272413&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/android-triple-version.c?rev=272413&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/android-triple-version.c (added)<br>
+++ cfe/trunk/test/Driver/android-triple-version.c Fri Jun 10 13:30:33 2016<br>
@@ -0,0 +1,10 @@<br>
+// Android's target triples can contain a version number in the environment<br>
+// field (e.g. arm-linux-androideabi9).<br>
+// Make sure that any version is stripped when finding toolchain binaries.<br>
+<br>
+// RUN: env "PATH=%S/Inputs/android_triple_version/bin" \<br>
+// RUN: %clang -### -target arm-linux-androideabi %s 2>&1 | FileCheck %s<br>
+// RUN: env "PATH=%S/Inputs/android_triple_version/bin" \<br>
+// RUN: %clang -### -target arm-linux-androideabi9 %s 2>&1 | FileCheck %s<br>
+<br>
+// CHECK: arm-linux-androideabi-ld<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div></div></div></div>
</blockquote></div>