Skip to content

Commit f4e80ec

Browse files
authored
Merge pull request #999 from compnerd/response
SwiftDriver: enable response files on LinkJobs
2 parents 8d2d6b6 + 91c7d8e commit f4e80ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/SwiftDriver/Jobs/LinkJob.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ extension Driver {
6464
targetInfo: frontendTargetInfo
6565
)
6666

67-
// TODO: some, but not all, linkers support response files.
6867
return Job(
6968
moduleName: moduleOutputInfo.name,
7069
kind: .link,
@@ -73,7 +72,10 @@ extension Driver {
7372
displayInputs: inputs,
7473
inputs: inputs,
7574
primaryInputs: [],
76-
outputs: [.init(file: outputFile.intern(), type: .image)]
75+
outputs: [.init(file: outputFile.intern(), type: .image)],
76+
// FIXME: newer ld64 supports response files as well, though really,
77+
// Darwin should use clang as the linker driver like the other targets
78+
supportsResponseFiles: !frontendTargetInfo.target.triple.isDarwin
7779
)
7880
}
7981
}

0 commit comments

Comments
 (0)