[llvm-branch-commits] [clang] b99e2b8 - clang/darwin: Use response files with ld64.lld.darwinnew

Nico Weber via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 1 12:09:24 PST 2020


Author: Nico Weber
Date: 2020-12-01T12:07:56-05:00
New Revision: b99e2b8b14f4ba50f9eb80bd5a2c1824099a7f96

URL: https://github.com/llvm/llvm-project/commit/b99e2b8b14f4ba50f9eb80bd5a2c1824099a7f96
DIFF: https://github.com/llvm/llvm-project/commit/b99e2b8b14f4ba50f9eb80bd5a2c1824099a7f96.diff

LOG: clang/darwin: Use response files with ld64.lld.darwinnew

The new MachO lld just grew support for response files in D92149, so let
the clang driver use it.

Differential Revision: https://reviews.llvm.org/D92399

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index db3d57a48098..f1846a573914 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -697,8 +697,10 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
     }
   }
 
-  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"};


        


More information about the llvm-branch-commits mailing list