r284430 - [Driver] Use stem rather than filename for executable name
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 17 15:02:53 PDT 2016
Author: phosek
Date: Mon Oct 17 17:02:53 2016
New Revision: 284430
URL: http://llvm.org/viewvc/llvm-project?rev=284430&view=rev
Log:
[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
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=284430&r1=284429&r2=284430&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Oct 17 17:02:53 2016
@@ -10060,7 +10060,7 @@ void fuchsia::Linker::ConstructJob(Compi
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");
}
More information about the cfe-commits
mailing list