<div dir="ltr">This test is failing for me on Windows:<div><div><br></div><div>FAIL: Clang :: Driver/fuse-ld.c (2955 of 7364)</div><div>******************** TEST 'Clang :: Driver/fuse-ld.c' FAILED ********************</div>
<div>Script:</div><div>--</div><div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -target x86_64-unknown-freebsd 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c --check-prefix=CHECK-FREEBSD-LD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=bfd --sysroot=D:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree -target x86_64-unknown-freebsd -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree/usr/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-FREEBSD-BFD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=gold --sysroot=D:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree -target x86_64-unknown-freebsd -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree/usr/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-FREEBSD-GOLD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=plib --sysroot=D:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree -target x86_64-unknown-freebsd -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree/usr/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-FREEBSD-PLIB</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -target arm-linux-androideabi -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c --check-prefix=CHECK-ANDROID-ARM-LD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=bfd -target arm-linux-androideabi -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-ANDROID-ARM-BFD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=gold -target arm-linux-androideabi -BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree/bin 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-ANDROID-ARM-GOLD</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -target arm-linux-androideabi -gcc-toolchain D:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c --check-prefix=CHECK-ANDROID-ARM-LD-TC</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=bfd -target arm-linux-androideabi -gcc-toolchain D:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-ANDROID-ARM-BFD-TC</div>
<div>D:/src/llvm/build/./bin/clang.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -### -fuse-ld=gold -target arm-linux-androideabi -gcc-toolchain D:\src\llvm\tools\clang\test\Driver/Inputs/basic_android_tree 2>&1 | D:/src/llvm/build/./bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Driver\fuse-ld.c -check-prefix=CHECK-ANDROID-ARM-GOLD-TC</div>
<div>--</div><div>Exit Code: 1</div><div><br></div><div>Command Output (stdout):</div><div>--</div><div>Command 0: "D:/src/llvm/build/./bin/clang.EXE" "D:\src\llvm\tools\clang\test\Driver\fuse-ld.c" "-###" "-target" "x86_64-unknown-freebsd"</div>
<div>Command 0 Result: 0</div><div>Command 0 Output:</div><div><br></div><div><br></div><div>Command 0 Stderr:</div><div><br></div><div><br></div><div>Command 1: "D:/src/llvm/build/./bin\FileCheck.EXE" "D:\src\llvm\tools\clang\test\Driver\fuse-ld.c" "--check-prefix=CHECK-FREEBSD-LD"</div>
<div>Command 1 Result: 0</div><div>Command 1 Output:</div><div><br></div><div><br></div><div>Command 1 Stderr:</div><div><br></div><div><br></div><div>Command 2: "D:/src/llvm/build/./bin/clang.EXE" "D:\src\llvm\tools\clang\test\Driver\fuse-ld.c" "-###" "-fuse-ld=bfd" "--sysroot=D:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree" "-target" "x86_64-unknown-freebsd" "-BD:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree/usr/bin"</div>
<div>Command 2 Result: 0</div><div>Command 2 Output:</div><div><br></div><div><br></div><div>Command 2 Stderr:</div><div><br></div><div><br></div><div>Command 3: "D:/src/llvm/build/./bin\FileCheck.EXE" "D:\src\llvm\tools\clang\test\Driver\fuse-ld.c" "-check-prefix=CHECK-FREEBSD-BFD"</div>
<div>Command 3 Result: 1</div><div>Command 3 Output:</div><div><br></div><div><br></div><div>Command 3 Stderr:</div><div>D:\src\llvm\tools\clang\test\Driver\fuse-ld.c:11:23: error: expected string not found in input</div>
<div>// CHECK-FREEBSD-BFD: Inputs/basic_freebsd_tree/usr/bin/ld.bfd</div><div> ^</div><div><stdin>:1:1: note: scanning from here</div><div>clang version 3.5.0</div><div>^</div><div><stdin>:5:39: note: possible intended match here</div>
<div> "D:\src\llvm\tools\clang\test\Driver/Inputs/basic_freebsd_tree/usr/bin\ld.bfd" "--sysroot=D:\\src\\llvm\\tools\\clang\\test\\Driver/Inputs/basic_freebsd_tree" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--enable-new-dtags" "-o" "a.out" "D:\\src\\llvm\\tools\\clang\\test\\Driver/Inputs/basic_freebsd_tree/usr/lib\\crt1.o" "crti.o" "crtbegin.o" "-LD:\\src\\llvm\\tools\\clang\\test\\Driver/Inputs/basic_freebsd_tree/usr/lib" "D:\\src\\tmp\\fuse-ld-0708b1.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtend.o" "crtn.o"</div>
<div> ^</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 7:23 AM, Logan Chien <span dir="ltr"><<a href="mailto:tzuhsiang.chien@gmail.com" target="_blank">tzuhsiang.chien@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: logan<br>
Date: Thu Jun 26 09:23:45 2014<br>
New Revision: 211785<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=211785&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=211785&view=rev</a><br>
Log:<br>
Implement the -fuse-ld= option.<br>
<br>
This commit implements the -fuse-ld= option, so that the user<br>
can specify -fuse-ld=bfd to use ld.bfd.<br>
<br>
This commit re-applies r194328 with some test case changes.<br>
It seems that r194328 was breaking macosx or mingw build<br>
because clang can't find ld.bfd or ld.gold in the given sysroot.<br>
We should use -B to specify the executable search path instead.<br>
<br>
Patch originally by David Chisnall.<br>
<br>
Added:<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd<br>
cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold<br>
cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/<br>
cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd<br>
cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold<br>
cfe/trunk/test/Driver/fuse-ld.c<br>
Modified:<br>
cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td<br>
cfe/trunk/include/clang/Driver/Options.td<br>
cfe/trunk/include/clang/Driver/ToolChain.h<br>
cfe/trunk/lib/Driver/ToolChain.cpp<br>
cfe/trunk/lib/Driver/ToolChains.cpp<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)<br>
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Jun 26 09:23:45 2014<br>
@@ -22,6 +22,8 @@ def err_drv_unknown_stdin_type_clang_cl<br>
def err_drv_unknown_language : Error<"language not recognized: '%0'">;<br>
def err_drv_invalid_arch_name : Error<<br>
"invalid arch name '%0'">;<br>
+def err_drv_invalid_linker_name : Error<<br>
+ "invalid linker name in argument '%0'">;<br>
def err_drv_invalid_rtlib_name : Error<<br>
"invalid runtime library name in argument '%0'">;<br>
def err_drv_unsupported_rtlib_for_platform : Error<<br>
<br>
Modified: cfe/trunk/include/clang/Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver/Options.td Thu Jun 26 09:23:45 2014<br>
@@ -1542,7 +1542,7 @@ def fprofile_dir : Joined<["-"], "fprofi<br>
<br>
defm profile_use : BooleanFFlag<"profile-use">, Group<clang_ignored_f_Group>;<br>
def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group<clang_ignored_f_Group>;<br>
-def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<clang_ignored_f_Group>;<br>
+def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>;<br>
<br>
defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_f_Group>;<br>
def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_f_Group>;<br>
<br>
Modified: cfe/trunk/include/clang/Driver/ToolChain.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/ToolChain.h (original)<br>
+++ cfe/trunk/include/clang/Driver/ToolChain.h Thu Jun 26 09:23:45 2014<br>
@@ -158,6 +158,10 @@ public:<br>
std::string GetFilePath(const char *Name) const;<br>
std::string GetProgramPath(const char *Name) const;<br>
<br>
+ /// Returns the linker path, respecting the -fuse-ld= argument to determine<br>
+ /// the linker suffix or name.<br>
+ std::string GetLinkerPath() const;<br>
+<br>
/// \brief Dispatch to the specific toolchain for verbose printing.<br>
///<br>
/// This is used when handling the verbose option to print detailed,<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChain.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChain.cpp Thu Jun 26 09:23:45 2014<br>
@@ -15,6 +15,7 @@<br>
#include "clang/Driver/Options.h"<br>
#include "clang/Driver/SanitizerArgs.h"<br>
#include "clang/Driver/ToolChain.h"<br>
+#include "llvm/ADT/SmallString.h"<br>
#include "llvm/ADT/StringSwitch.h"<br>
#include "llvm/Option/Arg.h"<br>
#include "llvm/Option/ArgList.h"<br>
@@ -147,6 +148,30 @@ std::string ToolChain::GetProgramPath(co<br>
return D.GetProgramPath(Name, *this);<br>
}<br>
<br>
+std::string ToolChain::GetLinkerPath() const {<br>
+ if (Arg *A = Args.getLastArg(options::OPT_fuse_ld_EQ)) {<br>
+ StringRef Suffix = A->getValue();<br>
+<br>
+ // If we're passed -fuse-ld= with no argument, or with the argument ld,<br>
+ // then use whatever the default system linker is.<br>
+ if (Suffix.empty() || Suffix == "ld")<br>
+ return GetProgramPath("ld");<br>
+<br>
+ llvm::SmallString<8> LinkerName("ld.");<br>
+ LinkerName.append(Suffix);<br>
+<br>
+ std::string LinkerPath(GetProgramPath(LinkerName.c_str()));<br>
+ if (llvm::sys::fs::exists(LinkerPath))<br>
+ return LinkerPath;<br>
+<br>
+ getDriver().Diag(diag::err_drv_invalid_linker_name) << A->getAsString(Args);<br>
+ return "";<br>
+ }<br>
+<br>
+ return GetProgramPath("ld");<br>
+}<br>
+<br>
+<br>
types::ID ToolChain::LookupTypeForExtension(const char *Ext) const {<br>
return types::lookupTypeForExtension(Ext);<br>
}<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChains.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Jun 26 09:23:45 2014<br>
@@ -3001,7 +3001,7 @@ Linux::Linux(const Driver &D, const llvm<br>
PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +<br>
GCCInstallation.getTriple().str() + "/bin").str());<br>
<br>
- Linker = GetProgramPath("ld");<br>
+ Linker = GetLinkerPath();<br>
<br>
Distro Distro = DetectDistro(Arch);<br>
<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=211785&r1=211784&r2=211785&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=211785&r1=211784&r2=211785&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jun 26 09:23:45 2014<br>
@@ -5614,7 +5614,7 @@ void darwin::Link::ConstructJob(Compilat<br>
Args.AddAllArgs(CmdArgs, options::OPT_F);<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -5804,7 +5804,7 @@ void solaris::Link::ConstructJob(Compila<br>
addProfileRT(getToolChain(), Args, CmdArgs);<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -5912,7 +5912,7 @@ void auroraux::Link::ConstructJob(Compil<br>
addProfileRT(getToolChain(), Args, CmdArgs);<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -6114,7 +6114,7 @@ void openbsd::Link::ConstructJob(Compila<br>
}<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -6250,7 +6250,7 @@ void bitrig::Link::ConstructJob(Compilat<br>
}<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -6514,7 +6514,7 @@ void freebsd::Link::ConstructJob(Compila<br>
addProfileRT(ToolChain, Args, CmdArgs);<br>
<br>
const char *Exec =<br>
- Args.MakeArgString(ToolChain.GetProgramPath("ld"));<br>
+ Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -6767,7 +6767,7 @@ void netbsd::Link::ConstructJob(Compilat<br>
<br>
addProfileRT(getToolChain(), Args, CmdArgs);<br>
<br>
- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -7325,7 +7325,7 @@ void minix::Link::ConstructJob(Compilati<br>
Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));<br>
}<br>
<br>
- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
@@ -7503,7 +7503,7 @@ void dragonfly::Link::ConstructJob(Compi<br>
<br>
addProfileRT(getToolChain(), Args, CmdArgs);<br>
<br>
- const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("ld"));<br>
+ const char *Exec = Args.MakeArgString(getToolChain().GetLinkerPath());<br>
C.addCommand(new Command(JA, *this, Exec, CmdArgs));<br>
}<br>
<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold?rev=211785&view=auto</a><br>
==============================================================================<br>
(empty)<br>
<br>
Added: cfe/trunk/test/Driver/fuse-ld.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fuse-ld.c?rev=211785&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fuse-ld.c?rev=211785&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/fuse-ld.c (added)<br>
+++ cfe/trunk/test/Driver/fuse-ld.c Thu Jun 26 09:23:45 2014<br>
@@ -0,0 +1,63 @@<br>
+// RUN: %clang %s -### \<br>
+// RUN: -target x86_64-unknown-freebsd 2>&1 \<br>
+// RUN: | FileCheck %s --check-prefix=CHECK-FREEBSD-LD<br>
+// CHECK-FREEBSD-LD: ld<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=bfd \<br>
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \<br>
+// RUN: -target x86_64-unknown-freebsd \<br>
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-BFD<br>
+// CHECK-FREEBSD-BFD: Inputs/basic_freebsd_tree/usr/bin/ld.bfd<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=gold \<br>
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \<br>
+// RUN: -target x86_64-unknown-freebsd \<br>
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD<br>
+// CHECK-FREEBSD-GOLD: Inputs/basic_freebsd_tree/usr/bin/ld.gold<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=plib \<br>
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \<br>
+// RUN: -target x86_64-unknown-freebsd \<br>
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-PLIB<br>
+// CHECK-FREEBSD-PLIB: error: invalid linker name<br>
+<br>
+<br>
+<br>
+// RUN: %clang %s -### \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \<br>
+// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD<br>
+// CHECK-ANDROID-ARM-LD: Inputs/basic_android_tree/bin/arm-linux-androideabi-ld<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=bfd \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD<br>
+// CHECK-ANDROID-ARM-BFD: Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=gold \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD<br>
+// CHECK-ANDROID-ARM-GOLD: Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold<br>
+<br>
+// RUN: %clang %s -### \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \<br>
+// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD-TC<br>
+// CHECK-ANDROID-ARM-LD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=bfd \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD-TC<br>
+// CHECK-ANDROID-ARM-BFD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.bfd<br>
+<br>
+// RUN: %clang %s -### -fuse-ld=gold \<br>
+// RUN: -target arm-linux-androideabi \<br>
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \<br>
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD-TC<br>
+// CHECK-ANDROID-ARM-GOLD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.gold<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>