Skip to content

Commit

Permalink
clang/darwin: Use response files with ld64.lld.darwinnew
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nico committed Dec 1, 2020
1 parent 9c5504a commit b99e2b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clang/lib/Driver/ToolChains/Darwin.cpp
Expand Up @@ -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"};
Expand Down

0 comments on commit b99e2b8

Please sign in to comment.