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
This commit is contained in:
Nico Weber 2020-12-01 11:46:15 -05:00
parent 9c5504adce
commit b99e2b8b14
1 changed files with 4 additions and 2 deletions

View File

@ -697,8 +697,10 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
} }
} }
ResponseFileSupport ResponseSupport = ResponseFileSupport::AtFileUTF8(); ResponseFileSupport ResponseSupport;
if (Version[0] < 607) { if (Version[0] >= 607 || LinkerIsLLDDarwinNew) {
ResponseSupport = ResponseFileSupport::AtFileUTF8();
} else {
// For older versions of the linker, use the legacy filelist method instead. // For older versions of the linker, use the legacy filelist method instead.
ResponseSupport = {ResponseFileSupport::RF_FileList, llvm::sys::WEM_UTF8, ResponseSupport = {ResponseFileSupport::RF_FileList, llvm::sys::WEM_UTF8,
"-filelist"}; "-filelist"};