Skip to content

Commit b83ecba

Browse files
committed
SwiftDriver: pass along linker options to the linker driver
Correct the handling for non-`-l` linker options on Windows. We now correctly forward the user-specified linker search paths to the linker through the linker driver.
1 parent 7412c3a commit b83ecba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/SwiftDriver/Jobs/WindowsToolchain+LinkerSupport.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ extension WindowsToolchain {
9292
try commandLine.appendPath(VirtualPath(path: framework.argument.asSingle))
9393
}
9494

95+
try commandLine.appendAllExcept(includeList: [.linkerOption],
96+
excludeList: [.l],
97+
from: &parsedOptions)
98+
9599
if let sdkPath = targetInfo.sdkPath?.path {
96100
commandLine.appendFlag("-I")
97101
commandLine.appendPath(VirtualPath.lookup(sdkPath))

0 commit comments

Comments
 (0)