Skip to content

Commit 59bf742

Browse files
committed
utils: Link static Foundation with static Dispatch
Previously, the static Foundation build was linking against the dynamic Dispatch build, resulting in a build failure when linking against the static Foundation. This fixes the issue by linking the static Foundation build against the static Dispatch build.
1 parent 5528cf1 commit 59bf742

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

utils/build.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2526,6 +2526,12 @@ function Build-Foundation {
25262526
@()
25272527
}
25282528

2529+
$DispatchCMakeModules = if ($Static) {
2530+
Get-ProjectCMakeModules $Platform ExperimentalDispatch
2531+
} else {
2532+
Get-ProjectCMakeModules $Platform Dispatch
2533+
}
2534+
25292535
Build-CMakeProject `
25302536
-Src $SourceCache\swift-corelibs-foundation `
25312537
-Bin $FoundationBinaryCache `
@@ -2549,7 +2555,7 @@ function Build-Foundation {
25492555
"$BinaryCache\$($Platform.Triple)\usr\lib\libz.a"
25502556
};
25512557
ZLIB_INCLUDE_DIR = "$BinaryCache\$($Platform.Triple)\usr\include";
2552-
dispatch_DIR = (Get-ProjectCMakeModules $Platform Dispatch);
2558+
dispatch_DIR = $DispatchCMakeModules;
25532559
SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
25542560
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
25552561
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";

0 commit comments

Comments
 (0)