Skip to content
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 @@ -853,6 +853,7 @@ enum Project {
Subprocess
Build
PackageManager
PackageManagerRuntime
Markdown
Format
LMDB
Expand Down Expand Up @@ -3585,6 +3586,27 @@ function Build-PackageManager([Hashtable] $Platform) {
}
}

function Build-PackageManagerRuntime([Hashtable] $Platform) {
$SrcDir = if (Test-Path -Path "$SourceCache\swift-package-manager" -PathType Container) {
"$SourceCache\swift-package-manager"
} else {
"$SourceCache\swiftpm"
}

Build-CMakeProject `
-Src $SrcDir\Sources\Runtimes `
-Bin (Get-ProjectBinaryCache $Platform PackageManagerRuntime) `
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
-Platform $Platform `
-UseBuiltCompilers C,CXX,Swift `
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
-UseGNUDriver `
-Defines @{
BUILD_SHARED_LIBS = "YES";
SwiftPM_ENABLE_RUNTIME = "NO";
}
}

function Build-Markdown([Hashtable] $Platform) {
Build-CMakeProject `
-Src $SourceCache\swift-markdown `
Expand Down Expand Up @@ -4116,6 +4138,8 @@ if (-not $SkipBuild) {

Write-PlatformInfoPlist Windows

Invoke-BuildStep Build-PackageManagerRuntime $HostPlatform

# Copy static dependencies
foreach ($Build in $WindowsSDKBuilds) {
if (-not $Build.LinkModes.Contains("static")) { continue }
Expand Down