From: Petr Hosek Date: Mon, 17 Oct 2016 22:02:53 +0000 (+0000) Subject: [Driver] Use stem rather than filename for executable name X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e7788f899fa71d1b99f9c81131119dbace85445;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284430 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index db473844d4..33fa9ebad7 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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"); }