[cfe-commits] r138941 - /cfe/trunk/lib/Driver/ToolChains.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Sep 1 09:25:50 PDT 2011
Author: rafael
Date: Thu Sep 1 11:25:49 2011
New Revision: 138941
URL: http://llvm.org/viewvc/llvm-project?rev=138941&view=rev
Log:
Fix PR10744 by adding the toolchain path to the regular program path
and doing a simple search. Before we would manually check for the linker
before the -B options were searched.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=138941&r1=138940&r2=138941&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Sep 1 11:25:49 2011
@@ -1617,11 +1617,12 @@
Lib = Lib64;
}
- llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld");
- if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists)
- Linker = LinkerPath.str();
- else
- Linker = GetProgramPath("ld");
+ // OpenSuse stores the linker with the compiler, add that to the search
+ // path.
+ ToolChain::path_list &PPaths = getProgramPaths();
+ PPaths.push_back(Base + "/../../../../" + GccTriple + "/bin");
+
+ Linker = GetProgramPath("ld");
LinuxDistro Distro = DetectLinuxDistro(Arch);
More information about the cfe-commits
mailing list