[PATCH] D25700: [Driver] Use stem rather than filename for executable name

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 14:29:32 PDT 2016


phosek created this revision.
phosek added a reviewer: davide.
phosek added a subscriber: cfe-commits.
phosek set the repository for this revision to rL LLVM.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D25700

Files:
  lib/Driver/Tools.cpp


Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -10060,7 +10060,7 @@
   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");
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25700.74905.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161017/89c609d7/attachment-0001.bin>


More information about the cfe-commits mailing list