Skip to content

Commit 5dd0825

Browse files
committed
utils: update experimental SDK builds
Adjust the build of the experimental SDK to build libdispatch statically.
1 parent 276261c commit 5dd0825

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

utils/build.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ enum Project {
710710
ExperimentalOverlay
711711
ExperimentalStringProcessing
712712
ExperimentalSynchronization
713+
ExperimentalDispatch
713714
StaticFoundation
714715
}
715716

@@ -2716,6 +2717,29 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
27162717
# TODO(compnerd) we currently build the experimental SDK with just the static
27172718
# variant. We should aim to build both dynamic and static variants.
27182719
Invoke-BuildStep Build-ExperimentalRuntime $Platform -Static
2720+
2721+
Invoke-IsolatingEnvVars {
2722+
$env:Path = "$(Get-CMarkBinaryCache $Platform)\src;$(Get-PinnedToolchainRuntime);${env:Path}"
2723+
Build-CMakeProject `
2724+
-Src $SourceCache\swift-corelibs-libdispatch `
2725+
-Bin (Get-ProjectBinaryCache $Platform ExperimentalDispatch) `
2726+
-InstallTo "$(Get-SwiftSDK $Platform.OS -Identifier "$($Platform.OS)Experimental")\usr" `
2727+
-Platform $Platform `
2728+
-UseBuiltCompilers C,CXX,Swift `
2729+
-SwiftSDK (Get-SwiftSDK $Platform.OS -Identifier "$($Platform.OS)Experimental") `
2730+
-Defines @{
2731+
BUILD_SHARED_LIBS = "NO";
2732+
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
2733+
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2734+
CMAKE_Swift_COMPILER_WORKS = "YES";
2735+
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
2736+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2737+
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
2738+
2739+
ENABLE_SWIFT = "YES";
2740+
}
2741+
}
2742+
27192743
Invoke-BuildStep Build-Foundation $Platform -Static
27202744
}
27212745

0 commit comments

Comments
 (0)