forked from OSchip/llvm-project
[Driver] Use stem rather than filename for executable name
When comparing the linker name in Fuchsia driver, use stem rather than filename to get the name of the linker becase on Windows, the filename will have an extension. Differential Revision: https://reviews.llvm.org/D25700 llvm-svn: 284430
This commit is contained in:
parent
9d58e362d2
commit
b406388e5f
|
@ -10060,7 +10060,7 @@ void fuchsia::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).equals_lower("lld")) {
|
||||
if (llvm::sys::path::stem(Exec).equals_lower("lld")) {
|
||||
CmdArgs.push_back("-flavor");
|
||||
CmdArgs.push_back("gnu");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue