Skip to content

Commit ffc3fb0

Browse files
authored
Merge pull request #84473 from compnerd/spm-runtime
build.ps1: separate SPM runtime build
2 parents d388da7 + 63b93fc commit ffc3fb0

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 `
@@ -4117,6 +4139,8 @@ if (-not $SkipBuild) {
41174139

41184140
Write-PlatformInfoPlist Windows
41194141

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

0 commit comments

Comments
 (0)