[PATCH] D78837: [lld] Remove special cases from default ld driver mode.

Dan Albert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 16:49:07 PDT 2020


danalbert created this revision.
danalbert added reviewers: MaskRay, int3.
danalbert added a project: lld.
Herald added a project: LLVM.

Use the Gnu driver mode by default for all platforms when ld is
invoked. Other names for the program (such as link or ld64) continue
working as before.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78837

Files:
  lld/tools/lld/lld.cpp


Index: lld/tools/lld/lld.cpp
===================================================================
--- lld/tools/lld/lld.cpp
+++ lld/tools/lld/lld.cpp
@@ -96,17 +96,9 @@
 }
 
 static Flavor parseProgname(StringRef progname) {
-#if __APPLE__
-  // Use Darwin driver for "ld" on Darwin.
-  if (progname == "ld")
-    return Darwin;
-#endif
-
-#if LLVM_ON_UNIX
-  // Use GNU driver for "ld" on other Unix-like system.
+  // Use GNU driver for "ld" by default.
   if (progname == "ld")
     return Gnu;
-#endif
 
   // Progname may be something like "lld-gnu". Parse it.
   SmallVector<StringRef, 3> v;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78837.260028.patch
Type: text/x-patch
Size: 597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/def1f1b3/attachment-0001.bin>


More information about the llvm-commits mailing list