summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2016-10-17 22:02:53 +0000
committerPetr Hosek <phosek@chromium.org>2016-10-17 22:02:53 +0000
commitb406388e5fa92ccfd792fbabe42411d28f5ce48a (patch)
treec976f528e21ce473cbfafb6a6baadd1875072962
parent9d58e362d21264df216cb6ca2e6f7d0e421061ab (diff)
downloadbcm5719-llvm-b406388e5fa92ccfd792fbabe42411d28f5ce48a.tar.gz
bcm5719-llvm-b406388e5fa92ccfd792fbabe42411d28f5ce48a.zip
[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
-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 db473844d4c..33fa9ebad74 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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");
}
OpenPOWER on IntegriCloud