Skip to content

Commit c1332a6

Browse files
committed
Jobs: do not inject the swiftautolink file into archives
It has been observed that a static library may sometimes contain the autolink extracted rules. This causes autolink-extract to not be able to process the archive as a dependency, causing a build failure.
1 parent 188cde2 commit c1332a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ extension GenericUnixToolchain {
294294
commandLine.appendFlag("crs")
295295
commandLine.appendPath(outputFile)
296296

297-
commandLine.append(contentsOf: inputs.map { .path($0.file) })
297+
commandLine.append(contentsOf: inputs.filter { $0.type == .object }
298+
.map { .path($0.file) })
298299
return try getToolPath(.staticLinker(lto))
299300
}
300301

0 commit comments

Comments
 (0)