Skip to content

Commit 780a546

Browse files
committed
[xcodegen] Restrict dependency computation a bit
Only consider `.o` and `.swiftmodule` inputs for now. Previously we could end up with unnecessary dependencies for e.g plugin dylibs, but we don't build and patch those in currently.
1 parent 1029764 commit 780a546

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utils/swift-xcodegen/Sources/SwiftXcodeGen/BuildArgs/SwiftTargets.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ struct SwiftTargets {
212212
// Add the dependencies. We track dependencies for any input files, along
213213
// with any recorded swiftmodule dependencies.
214214
dependenciesByTargetName.withValue(for: name, default: []) { deps in
215-
deps.formUnion(rule.inputs)
215+
deps.formUnion(
216+
rule.inputs.filter {
217+
$0.hasExtension(.swiftmodule) || $0.hasExtension(.o)
218+
}
219+
)
216220
deps.formUnion(
217221
rule.dependencies.filter { $0.hasExtension(.swiftmodule) }
218222
)

0 commit comments

Comments
 (0)