forked from OSchip/llvm-project
[Driver] Use stem() and not filename().
On Windows the filename might have an extension, namely `.exe`, so the search will fail. Sorry, I don't have a good way to test this as it seems to fail only in some weird configurations. r284430 has the same modification for Fuchsia. llvm-svn: 294879
This commit is contained in:
parent
04840ab752
commit
4efbbce4d1
|
@ -10163,7 +10163,7 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.ClaimAllArgs(options::OPT_w);
|
||||
|
||||
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
|
||||
if (llvm::sys::path::filename(Exec) == "lld") {
|
||||
if (llvm::sys::path::stem(Exec) == "lld") {
|
||||
CmdArgs.push_back("-flavor");
|
||||
CmdArgs.push_back("old-gnu");
|
||||
CmdArgs.push_back("-target");
|
||||
|
|
Loading…
Reference in New Issue