diff --git a/utils/build.ps1 b/utils/build.ps1 index d5c18a5b9b28c..d3ff19da3adc6 100644 --- a/utils/build.ps1 +++ b/utils/build.ps1 @@ -710,6 +710,7 @@ enum Project { ExperimentalOverlay ExperimentalStringProcessing ExperimentalSynchronization + ExperimentalDispatch StaticFoundation } @@ -2716,6 +2717,29 @@ function Build-ExperimentalSDK([Hashtable] $Platform) { # TODO(compnerd) we currently build the experimental SDK with just the static # variant. We should aim to build both dynamic and static variants. Invoke-BuildStep Build-ExperimentalRuntime $Platform -Static + + Invoke-IsolatingEnvVars { + $env:Path = "$(Get-CMarkBinaryCache $Platform)\src;$(Get-PinnedToolchainRuntime);${env:Path}" + Build-CMakeProject ` + -Src $SourceCache\swift-corelibs-libdispatch ` + -Bin (Get-ProjectBinaryCache $Platform ExperimentalDispatch) ` + -InstallTo "$(Get-SwiftSDK $Platform.OS -Identifier "$($Platform.OS)Experimental")\usr" ` + -Platform $Platform ` + -UseBuiltCompilers C,CXX,Swift ` + -SwiftSDK (Get-SwiftSDK $Platform.OS -Identifier "$($Platform.OS)Experimental") ` + -Defines @{ + BUILD_SHARED_LIBS = "NO"; + CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES"; + CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform); + CMAKE_Swift_COMPILER_WORKS = "YES"; + CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir"); + CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib"; + CMAKE_SYSTEM_NAME = $Platform.OS.ToString(); + + ENABLE_SWIFT = "YES"; + } + } + Invoke-BuildStep Build-Foundation $Platform -Static }