Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Sources/SwiftDriver/Jobs/LinkJob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ extension Driver {
mutating func linkJob(inputs: [TypedVirtualPath]) throws -> Job {
var commandLine: [Job.ArgTemplate] = []

#if os(Windows)
// We invoke clang as `clang.exe`, which expects a POSIX-style response file by default (`clang-cl.exe` expects
// Windows-style response files).
// The driver is outputting Windows-style response files because swift-frontend expects Windows-style response
// files.
// Force `clang.exe` into parsing Windows-style response files.
commandLine.appendFlag("--rsp-quoting=windows")
#endif

// Compute the final output file
let outputFile: VirtualPath
if let output = parsedOptions.getLastArgument(.o) {
Expand Down
7 changes: 7 additions & 0 deletions Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ extension WindowsToolchain {
let clangTool: Tool = cxxCompatEnabled ? .clangxx : .clang
var clang = try getToolPath(clangTool)

// We invoke clang as `clang.exe`, which expects a POSIX-style response file by default (`clang-cl.exe` expects
// Windows-style response files).
// The driver is outputting Windows-style response files because swift-frontend expects Windows-style response
// files.
// Force `clang.exe` into parsing Windows-style response files.
commandLine.appendFlag("--rsp-quoting=windows")

let targetTriple = targetInfo.target.triple
if !targetTriple.triple.isEmpty {
commandLine.appendFlag("-target")
Expand Down