Skip to content

Commit 807d1e9

Browse files
authored
Make PackageCollectionsSigningLibc dep conditional on supported platforms. (#6043)
PackageCollectionsSigningLibc is only available in Linux, Android and Windows. However, PackageCollectionsSigning dependency on it is unconditional. This does not matter in because the target and the dependency are added only for the supported platforms, but with the recently introduced #5784, the conditional code can be removed and the manifest can be simplified. At the moment we can only add the dependency condition, because #5784 is not released yet, and Xcode's `swift build` will not correctly discard the target when building all targets just yet.
1 parent c8c81fa commit 807d1e9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Package.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ packageCollectionsSigningTargets.append(
8282
]
8383
)
8484
)
85-
packageCollectionsSigningDeps.append("PackageCollectionsSigningLibc")
85+
packageCollectionsSigningDeps.append(
86+
.target(
87+
name: "PackageCollectionsSigningLibc",
88+
condition: .when(
89+
platforms: [.linux, .android, .windows]
90+
)
91+
)
92+
)
8693
#endif
8794
// Define PackageCollectionsSigning target always
8895
packageCollectionsSigningTargets.append(

0 commit comments

Comments
 (0)