[PATCH] D92399: clang/darwin: Use response files with ld64.lld.darwinnew

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 1 08:47:46 PST 2020


thakis created this revision.
thakis added a reviewer: hans.
thakis requested review of this revision.

The new MachO lld just grew support for response files in D92149 <https://reviews.llvm.org/D92149>, so let
the clang driver use it.


https://reviews.llvm.org/D92399

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp


Index: clang/lib/Driver/ToolChains/Darwin.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Darwin.cpp
+++ clang/lib/Driver/ToolChains/Darwin.cpp
@@ -697,8 +697,10 @@
     }
   }
 
-  ResponseFileSupport ResponseSupport = ResponseFileSupport::AtFileUTF8();
-  if (Version[0] < 607) {
+  ResponseFileSupport ResponseSupport;
+  if (Version[0] >= 607 || LinkerIsLLDDarwinNew) {
+    ResponseSupport = ResponseFileSupport::AtFileUTF8()
+  } else {
     // For older versions of the linker, use the legacy filelist method instead.
     ResponseSupport = {ResponseFileSupport::RF_FileList, llvm::sys::WEM_UTF8,
                        "-filelist"};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92399.308672.patch
Type: text/x-patch
Size: 698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201201/678328dc/attachment-0001.bin>


More information about the cfe-commits mailing list