<div dir="ltr">I'm perhaps not the only person who is wondering, so I'll update the original thread instead of replying to this thread.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 12, 2017 at 4:07 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">cc @rui this is why I reverted it.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 13, 2017 at 12:00 AM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mike,<br><br>I reverted this for now, I assume it has to do with the argument ordering.<br>Will try a change and re apply.<br><br>Many Thanks,<br>Martell</div><div class="m_-6987288437442822173HOEnZb"><div class="m_-6987288437442822173h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 12, 2017 at 11:57 PM, Martell Malone <span dir="ltr"><<a href="mailto:martellmalone@gmail.com" target="_blank">martellmalone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mike,<br><br>I actually posted this in the phab thread a few minutes ago.<br><br>```<br><span style="font-size:12.8px">Tests for this pass locally but the build bots are complaining with</span><span><span class="m_-6987288437442822173m_-6933694478344342827m_3426353722089707391gmail-im" style="font-size:12.8px"><br><br><div>// CHECK_LLD_32: "{{[^"]*}}ld.lld{{(.exe)?}}"</div></span></span><div style="font-size:12.8px">                 ^</div><div style="font-size:12.8px"><stdin>:1:1: note: scanning from here</div><div style="font-size:12.8px">clang version 6.0.0 (trunk 313082)</div><div style="font-size:12.8px">^</div><div style="font-size:12.8px"><stdin>:5:51: note: possible intended match here</div><div style="font-size:12.8px">clang-6.0: error: invalid linker name in argument '-fuse-ld=lld'</div><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Can someone enlighten me before I do a revert? :)<br></span>```<br><br>Best,<br>Martell</div><div class="m_-6987288437442822173m_-6933694478344342827HOEnZb"><div class="m_-6987288437442822173m_-6933694478344342827h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 12, 2017 at 11:54 PM, Mike Edwards <span dir="ltr"><<a href="mailto:mike@sqlby.me" target="_blank">mike@sqlby.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>Would you please have a look at:</div><div><a href="http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42380/" target="_blank">http://green.lab.llvm.org/gree<wbr>n/job/clang-stage1-cmake-RA-in<wbr>cremental/42380/</a><br></div><div><br></div><div>it appears this commit is causing some tests to fail on our bots.  Any assistance you may provide in getting the bots back green would be greatly appreciated.</div><div><br></div><div>Respectfully,</div><div>Mike Edwards</div></div><div class="m_-6987288437442822173m_-6933694478344342827m_3426353722089707391HOEnZb"><div class="m_-6987288437442822173m_-6933694478344342827m_3426353722089707391h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 12, 2017 at 3:14 PM, Martell Malone via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: martell<br>
Date: Tue Sep 12 15:14:18 2017<br>
New Revision: 313082<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=313082&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=313082&view=rev</a><br>
Log:<br>
[Driver] MinGW: Remove custom linker detection<br>
<br>
In rL289668 the ability to specify the default linker at compile time<br>
was added but because the MinGW driver used custom detection we could<br>
not take advantage of this new CMAKE flag CLANG_DEFAULT_LINKER.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Driver/ToolChain<wbr>s/MinGW.cpp<br>
    cfe/trunk/test/Driver/mingw-us<wbr>eld.c<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChain<wbr>s/MinGW.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MinGW.cpp?rev=313082&r1=313081&r2=313082&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/lib/Driver/Too<wbr>lChains/MinGW.cpp?rev=313082&r<wbr>1=313081&r2=313082&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/lib/Driver/ToolChain<wbr>s/MinGW.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChain<wbr>s/MinGW.cpp Tue Sep 12 15:14:18 2017<br>
@@ -104,14 +104,6 @@ void tools::MinGW::Linker::Construc<wbr>tJob(<br>
   // handled somewhere else.<br>
   Args.ClaimAllArgs(options::OP<wbr>T_w);<br>
<br>
-  StringRef LinkerName = Args.getLastArgValue(options::<wbr>OPT_fuse_ld_EQ, "ld");<br>
-  if (LinkerName.equals_lower("lld"<wbr>)) {<br>
-    CmdArgs.push_back("-flavor");<br>
-    CmdArgs.push_back("gnu");<br>
-  } else if (!LinkerName.equals_lower("ld"<wbr>)) {<br>
-    D.Diag(diag::err_drv_unsupport<wbr>ed_linker) << LinkerName;<br>
-  }<br>
-<br>
   if (!D.SysRoot.empty())<br>
     CmdArgs.push_back(Args.MakeAr<wbr>gString("--sysroot=" + D.SysRoot));<br>
<br>
@@ -241,7 +233,7 @@ void tools::MinGW::Linker::Construc<wbr>tJob(<br>
<br>
       if (Args.hasArg(options::OPT_stat<wbr>ic))<br>
         CmdArgs.push_back("--end-grou<wbr>p");<br>
-      else if (!LinkerName.equals_lower("lld<wbr>"))<br>
+      else<br>
         AddLibGCC(Args, CmdArgs);<br>
     }<br>
<br>
@@ -252,7 +244,7 @@ void tools::MinGW::Linker::Construc<wbr>tJob(<br>
       CmdArgs.push_back(Args.MakeAr<wbr>gString(TC.GetFilePath("crtend<wbr>.o")));<br>
     }<br>
   }<br>
-  const char *Exec = Args.MakeArgString(TC.GetProgr<wbr>amPath(LinkerName.data()));<br>
+  const char *Exec = Args.MakeArgString(TC.GetLinke<wbr>rPath());<br>
   C.addCommand(llvm::make_uniqu<wbr>e<Command>(JA, *this, Exec, CmdArgs, Inputs));<br>
 }<br>
<br>
<br>
Modified: cfe/trunk/test/Driver/mingw-us<wbr>eld.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mingw-useld.c?rev=313082&r1=313081&r2=313082&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/cfe/trunk/test/Driver/mi<wbr>ngw-useld.c?rev=313082&r1=3130<wbr>81&r2=313082&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/test/Driver/mingw-us<wbr>eld.c (original)<br>
+++ cfe/trunk/test/Driver/mingw-us<wbr>eld.c Tue Sep 12 15:14:18 2017<br>
@@ -1,19 +1,19 @@<br>
-// RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clan<wbr>g_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s<br>
-// CHECK_LD_32: ld{{(.exe)?}}"<br>
+// RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clan<wbr>g_tree/mingw32 %s -fuse-ld=platform 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s<br>
+// CHECK_LD_32: "{{[^"]*}}ld{{(.exe)?}}"<br>
 // CHECK_LD_32: "i386pe"<br>
-// CHECK_LD_32-NOT: "-flavor" "gnu"<br>
+// CHECK_LD_32-NOT: "{{[^"]*}}ld.lld{{(.exe)?}}"<br>
<br>
 // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clan<wbr>g_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s<br>
 // CHECK_LLD_32-NOT: invalid linker name in argument<br>
-// CHECK_LLD_32: lld{{(.exe)?}}" "-flavor" "gnu"<br>
+// CHECK_LLD_32: "{{[^"]*}}ld.lld{{(.exe)?}}"<br>
 // CHECK_LLD_32: "i386pe"<br>
<br>
 // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clan<wbr>g_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s<br>
 // CHECK_LLD_64-NOT: invalid linker name in argument<br>
-// CHECK_LLD_64: lld{{(.exe)?}}" "-flavor" "gnu"<br>
+// CHECK_LLD_64: "{{[^"]*}}ld.lld{{(.exe)?}}"<br>
 // CHECK_LLD_64: "i386pep"<br>
<br>
 // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clan<wbr>g_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s<br>
 // CHECK_LLD_ARM-NOT: invalid linker name in argument<br>
-// CHECK_LLD_ARM: lld{{(.exe)?}}" "-flavor" "gnu"<br>
+// CHECK_LLD_ARM: "{{[^"]*}}ld.lld{{(.exe)?}}"<br>
 // CHECK_LLD_ARM: "thumb2pe"<br>
<br>
<br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>