@@ -1061,7 +1061,11 @@ function Build-Compilers() {
1061
1061
}
1062
1062
}
1063
1063
1064
- function Build-LLVM ($Arch ) {
1064
+ enum Platform {
1065
+ Windows
1066
+ }
1067
+
1068
+ function Build-LLVM ([Platform ]$Platform , $Arch ) {
1065
1069
Build-CMakeProject `
1066
1070
- Src $SourceCache \llvm- project\llvm `
1067
1071
- Bin (Get-TargetProjectBinaryCache $Arch LLVM) `
@@ -1071,7 +1075,7 @@ function Build-LLVM($Arch) {
1071
1075
}
1072
1076
}
1073
1077
1074
- function Build-ZLib ($Arch ) {
1078
+ function Build-ZLib ([ Platform ] $Platform , $Arch ) {
1075
1079
$ArchName = $Arch.ShortName
1076
1080
1077
1081
Build-CMakeProject `
@@ -1087,7 +1091,7 @@ function Build-ZLib($Arch) {
1087
1091
}
1088
1092
}
1089
1093
1090
- function Build-XML2 ($Arch ) {
1094
+ function Build-XML2 ([ Platform ] $Platform , $Arch ) {
1091
1095
$ArchName = $Arch.ShortName
1092
1096
1093
1097
Build-CMakeProject `
@@ -1110,7 +1114,7 @@ function Build-XML2($Arch) {
1110
1114
}
1111
1115
}
1112
1116
1113
- function Build-CURL ($Arch ) {
1117
+ function Build-CURL ([ Platform ] $Platform , $Arch ) {
1114
1118
$ArchName = $Arch.ShortName
1115
1119
1116
1120
Build-CMakeProject `
@@ -1203,7 +1207,7 @@ function Build-CURL($Arch) {
1203
1207
}
1204
1208
}
1205
1209
1206
- function Build-ICU ($Arch ) {
1210
+ function Build-ICU ([ Platform ] $Platform , $Arch ) {
1207
1211
$ArchName = $Arch.ShortName
1208
1212
1209
1213
if (-not $ToBatch ) {
@@ -1236,7 +1240,7 @@ function Build-ICU($Arch) {
1236
1240
})
1237
1241
}
1238
1242
1239
- function Build-Runtime ($Arch ) {
1243
+ function Build-Runtime ([ Platform ] $Platform , $Arch ) {
1240
1244
Isolate- EnvVars {
1241
1245
$env: Path = " $ ( $HostArch.BinaryCache ) \cmark-gfm-0.29.0.gfm.13\src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
1242
1246
@@ -1270,7 +1274,7 @@ function Build-Runtime($Arch) {
1270
1274
- OutFile " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist"
1271
1275
}
1272
1276
1273
- function Build-Dispatch ($Arch , [switch ]$Test = $false ) {
1277
+ function Build-Dispatch ([ Platform ] $Platform , $Arch , [switch ]$Test = $false ) {
1274
1278
$Targets = if ($Test ) { @ (" default" , " ExperimentalTest" ) } else { @ (" default" , " install" ) }
1275
1279
1276
1280
Build-CMakeProject `
@@ -1287,7 +1291,7 @@ function Build-Dispatch($Arch, [switch]$Test = $false) {
1287
1291
}
1288
1292
}
1289
1293
1290
- function Build-Foundation ($Arch , [switch ]$Test = $false ) {
1294
+ function Build-Foundation ([ Platform ] $Platform , $Arch , [switch ]$Test = $false ) {
1291
1295
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
1292
1296
$FoundationBinaryCache = Get-TargetProjectBinaryCache $Arch Foundation
1293
1297
$ShortArch = $Arch.ShortName
@@ -1336,7 +1340,7 @@ function Build-Foundation($Arch, [switch]$Test = $false) {
1336
1340
}
1337
1341
}
1338
1342
1339
- function Build-XCTest ($Arch , [switch ]$Test = $false ) {
1343
+ function Build-XCTest ([ Platform ] $Platform , $Arch , [switch ]$Test = $false ) {
1340
1344
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
1341
1345
$FoundationBinaryCache = Get-TargetProjectBinaryCache $Arch Foundation
1342
1346
$XCTestBinaryCache = Get-TargetProjectBinaryCache $Arch XCTest
@@ -1890,19 +1894,19 @@ if ($Clean) {
1890
1894
}
1891
1895
}
1892
1896
1893
- foreach ( $Arch in $WindowsSDKArchs ) {
1894
- if ( -not $SkipBuild ) {
1895
- Invoke-BuildStep Build-ZLib $Arch
1896
- Invoke-BuildStep Build-XML2 $Arch
1897
- Invoke-BuildStep Build-CURL $Arch
1898
- Invoke-BuildStep Build-ICU $Arch
1899
- Invoke-BuildStep Build-LLVM $Arch
1897
+ if ( -not $SkipBuild ) {
1898
+ foreach ( $Arch in $WindowsSDKArchs ) {
1899
+ Invoke-BuildStep Build-ZLib Windows $Arch
1900
+ Invoke-BuildStep Build-XML2 Windows $Arch
1901
+ Invoke-BuildStep Build-CURL Windows $Arch
1902
+ Invoke-BuildStep Build-ICU Windows $Arch
1903
+ Invoke-BuildStep Build-LLVM Windows $Arch
1900
1904
1901
1905
# Build platform: SDK, Redist and XCTest
1902
- Invoke-BuildStep Build-Runtime $Arch
1903
- Invoke-BuildStep Build-Dispatch $Arch
1904
- Invoke-BuildStep Build-Foundation $Arch
1905
- Invoke-BuildStep Build-XCTest $Arch
1906
+ Invoke-BuildStep Build-Runtime Windows $Arch
1907
+ Invoke-BuildStep Build-Dispatch Windows $Arch
1908
+ Invoke-BuildStep Build-Foundation Windows $Arch
1909
+ Invoke-BuildStep Build-XCTest Windows $Arch
1906
1910
}
1907
1911
}
1908
1912
@@ -1963,9 +1967,15 @@ if ($Test -ne $null -and (Compare-Object $Test @("clang", "lld", "lldb", "llvm",
1963
1967
Build-Compilers $HostArch @Tests
1964
1968
}
1965
1969
1966
- if ($Test -contains " dispatch" ) { Build-Dispatch $HostArch - Test }
1967
- if ($Test -contains " foundation" ) { Build-Foundation $HostArch - Test }
1968
- if ($Test -contains " xctest" ) { Build-XCTest $HostArch - Test }
1970
+ if ($Test -contains " dispatch" ) {
1971
+ Build-Dispatch Windows $HostArch - Test
1972
+ }
1973
+ if ($Test -contains " foundation" ) {
1974
+ Build-Foundation Windows $HostArch - Test
1975
+ }
1976
+ if ($Test -contains " xctest" ) {
1977
+ Build-XCTest Windows $HostArch - Test
1978
+ }
1969
1979
if ($Test -contains " llbuild" ) { Build-LLBuild $HostArch - Test }
1970
1980
if ($Test -contains " swiftpm" ) { Test-PackageManager $HostArch }
1971
1981
0 commit comments