Skip to content

Commit 18f5ebb

Browse files
Fix build of host&target destination products with --static-swift-stdlib
Given the following conditions: - `--static-swift-stdlib` is enabled (it only affects "target" destination products, "host" destination products are always dynamic) - the building subset contains both "host" and "target" destination products derived from the same product. - the product imports `Foundation` (that has private dependency libs) then the build randomly failed due to the race condition of the Objects.LinkFileList creation. This commit fixes the issue by distinguishing the temporary link file list response file name by the `-tool` suffix.
1 parent 71d4407 commit 18f5ebb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Build/BuildDescription/ProductBuildDescription.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public final class ProductBuildDescription: SPMBuildCore.ProductBuildDescription
6666

6767
/// Path to the temporary directory for this product.
6868
var tempsPath: AbsolutePath {
69-
self.buildParameters.buildPath.appending(component: self.product.name + ".product")
69+
let suffix = buildParameters.suffix
70+
return self.buildParameters.buildPath.appending(component: "\(self.product.name)\(suffix).product")
7071
}
7172

7273
/// Path to the link filelist file.

0 commit comments

Comments
 (0)