27 lines
1.3 KiB
Diff
27 lines
1.3 KiB
Diff
|
From 8dda3589e3e9fc940e8704a083a54a647ffde795
|
||
|
From: Saleem Abdulrasool <compnerd@compnerd.org>
|
||
|
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/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift b/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
|
||
|
index a08e3fa1..93eceb72 100644
|
||
|
--- a/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
|
||
|
+++ b/swift-driver/Sources/SwiftDriver/Jobs/GenericUnixToolchain+LinkerSupport.swift
|
||
|
@@ -290,7 +290,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))
|
||
|
}
|
||
|
|