Skip to content

utils: update experimental SDK builds #82191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ enum Project {
ExperimentalOverlay
ExperimentalStringProcessing
ExperimentalSynchronization
ExperimentalDispatch
StaticFoundation
}

Expand Down Expand Up @@ -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
}

Expand Down