[PATCH] D92357: clang/darwin: Don't use response files with ld64, do use them with ld64.lld.darwinnew

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 17:13:07 PST 2020


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

This morally reverts D82777 <https://reviews.llvm.org/D82777> -- turns out that ld64 crashes with many
response files, so we must stop passing them to it until the crash is
fixed.

On the other hand, the new MachO lld just grew support for response
files in D92149 <https://reviews.llvm.org/D92149>, so do pass response files to it.


https://reviews.llvm.org/D92357

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,13 @@
     }
   }
 
-  ResponseFileSupport ResponseSupport = ResponseFileSupport::AtFileUTF8();
-  if (Version[0] < 607) {
+  ResponseFileSupport ResponseSupport;
+  if (LinkerIsLLDDarwinNew) {
+    // Xcode12's ld64 added support for @response files, but it's crashy:
+    // https://openradar.appspot.com/radar?id=4933317065441280
+    // FIXME: Pass this for ld64 once it no longer crashes.
+    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: D92357.308505.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201201/ff9c2f77/attachment.bin>


More information about the cfe-commits mailing list