Skip to content

Commit b37d0f6

Browse files
authored
Merge pull request #82856 from Steelskin/fabrice/fix-static-foundation-link-static-dispatch
utils: Link static Foundation with static Dispatch
2 parents fe86091 + 59bf742 commit b37d0f6

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)