r294879 - [Driver] Use stem() and not filename().
Davide Italiano via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 11 15:44:37 PST 2017
Author: davide
Date: Sat Feb 11 17:44:37 2017
New Revision: 294879
URL: http://llvm.org/viewvc/llvm-project?rev=294879&view=rev
Log:
[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.
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=294879&r1=294878&r2=294879&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Feb 11 17:44:37 2017
@@ -10163,7 +10163,7 @@ void gnutools::Linker::ConstructJob(Comp
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");
More information about the cfe-commits
mailing list