summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-02-11 23:44:37 +0000
committerDavide Italiano <davide@freebsd.org>2017-02-11 23:44:37 +0000
commit4efbbce4d1994247885e17e103ee0a01979ea042 (patch)
tree5bc8359240cb76d2c7ebc1937845976118916b63 /clang/lib/Driver/Tools.cpp
parent04840ab7520c93d3ba44f8f08e5068c3f9a6154a (diff)
downloadbcm5719-llvm-4efbbce4d1994247885e17e103ee0a01979ea042.tar.gz
bcm5719-llvm-4efbbce4d1994247885e17e103ee0a01979ea042.zip
[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
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index e14c14d3914..87153c33fe5 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -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");
OpenPOWER on IntegriCloud