From c1332a6906e12a8abd66cbbb48fca6697b03de4c Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 23 Jul 2021 09:26:48 -0700 Subject: [PATCH] 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. --- .../SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift b/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift index b1da0df28..83484f4b0 100644 --- a/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift +++ b/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift @@ -294,7 +294,8 @@ extension GenericUnixToolchain { commandLine.appendFlag("crs") commandLine.appendPath(outputFile) - commandLine.append(contentsOf: inputs.map { .path($0.file) }) + commandLine.append(contentsOf: inputs.filter { $0.type == .object } + .map { .path($0.file) }) return try getToolPath(.staticLinker(lto)) }