Skip to content

Commit 63b93fc

Browse files
committed
build.ps1: separate SPM runtime build
1 parent c4b2366 commit 63b93fc

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
@@ -853,6 +853,7 @@ enum Project {
853853
Subprocess
854854
Build
855855
PackageManager
856+
PackageManagerRuntime
856857
Markdown
857858
Format
858859
LMDB
@@ -3585,6 +3586,27 @@ function Build-PackageManager([Hashtable] $Platform) {
35853586
}
35863587
}
35873588

3589+
function Build-PackageManagerRuntime([Hashtable] $Platform) {
3590+
$SrcDir = if (Test-Path -Path "$SourceCache\swift-package-manager" -PathType Container) {
3591+
"$SourceCache\swift-package-manager"
3592+
} else {
3593+
"$SourceCache\swiftpm"
3594+
}
3595+
3596+
Build-CMakeProject `
3597+
-Src $SrcDir\Sources\Runtimes `
3598+
-Bin (Get-ProjectBinaryCache $Platform PackageManagerRuntime) `
3599+
-InstallTo "$($Platform.ToolchainInstallRoot)\usr" `
3600+
-Platform $Platform `
3601+
-UseBuiltCompilers C,CXX,Swift `
3602+
-SwiftSDK (Get-SwiftSDK -OS $Platform.OS -Identifier $Platform.DefaultSDK) `
3603+
-UseGNUDriver `
3604+
-Defines @{
3605+
BUILD_SHARED_LIBS = "YES";
3606+
SwiftPM_ENABLE_RUNTIME = "NO";
3607+
}
3608+
}
3609+
35883610
function Build-Markdown([Hashtable] $Platform) {
35893611
Build-CMakeProject `
35903612
-Src $SourceCache\swift-markdown `
@@ -4116,6 +4138,8 @@ if (-not $SkipBuild) {
41164138

41174139
Write-PlatformInfoPlist Windows
41184140

4141+
Invoke-BuildStep Build-PackageManagerRuntime $HostPlatform
4142+
41194143
# Copy static dependencies
41204144
foreach ($Build in $WindowsSDKBuilds) {
41214145
if (-not $Build.LinkModes.Contains("static")) { continue }

0 commit comments

Comments
 (0)