forked from OSchip/llvm-project
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. llvm-svn: 138941
This commit is contained in:
parent
ecc25a2812
commit
5f344fff08
|
@ -1617,10 +1617,11 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
|
|||
Lib = Lib64;
|
||||
}
|
||||
|
||||
llvm::sys::Path LinkerPath(Base + "/../../../../" + GccTriple + "/bin/ld");
|
||||
if (!llvm::sys::fs::exists(LinkerPath.str(), Exists) && Exists)
|
||||
Linker = LinkerPath.str();
|
||||
else
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue