@@ -2277,25 +2277,31 @@ function Write-SDKSettingsPlist([Platform]$Platform, $Arch) {
2277
2277
$SDKSettings | ConvertTo-JSON | Out-FIle - FilePath " $ ( Get-SwiftSDK $Platform ) \SDKSettings.json"
2278
2278
}
2279
2279
2280
- function Build-Dispatch ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
2281
- Invoke-IsolatingEnvVars {
2282
- if ($Test ) {
2283
- $Targets = @ (" default" , " ExperimentalTest" )
2284
- $InstallPath = " "
2285
- $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2286
- } else {
2287
- $Targets = @ (" install" )
2288
- $InstallPath = " $ ( Get-SwiftSDK $Platform ) \usr"
2280
+ function Build-Dispatch ([Platform ]$Platform , $Arch ) {
2281
+ Build-CMakeProject `
2282
+ - Src $SourceCache \swift- corelibs- libdispatch `
2283
+ - Bin (Get-ProjectBinaryCache $Arch Dispatch) `
2284
+ - InstallTo " $ ( Get-SwiftSDK $Platform ) \usr" `
2285
+ - Arch $Arch `
2286
+ - Platform $Platform `
2287
+ - UseBuiltCompilers C, CXX, Swift `
2288
+ - Defines @ {
2289
+ ENABLE_SWIFT = " YES" ;
2289
2290
}
2291
+ }
2292
+
2293
+ function Test-Dispatch {
2294
+ Invoke-IsolatingEnvVars {
2295
+ $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2290
2296
2291
2297
Build-CMakeProject `
2292
2298
- Src $SourceCache \swift- corelibs- libdispatch `
2293
- - Bin (Get-ProjectBinaryCache $Arch Dispatch) `
2294
- - InstallTo $InstallPath `
2295
- - Arch $Arch `
2296
- - Platform $Platform `
2299
+ - Bin (Get-ProjectBinaryCache $BuildArch Dispatch) `
2300
+ - Arch $BuildArch `
2301
+ - Platform Windows `
2297
2302
- BuildTargets $Targets `
2298
- - SwiftSDK (Get-SwiftSDK $Platform ) `
2303
+ - SwiftSDK (Get-SwiftSDK Windows) `
2304
+ - BuildTargets default , ExperimentalTest `
2299
2305
- UseBuiltCompilers C, CXX, Swift `
2300
2306
- Defines @ {
2301
2307
ENABLE_SWIFT = " YES" ;
@@ -3280,9 +3286,7 @@ if (-not $IsCrossCompiling) {
3280
3286
Build-Compilers $HostArch @Tests
3281
3287
}
3282
3288
3283
- if ($Test -contains " dispatch" ) {
3284
- Build-Dispatch Windows $HostArch - Test
3285
- }
3289
+ if ($Test -contains " dispatch" ) { Test-Dispatch }
3286
3290
if ($Test -contains " foundation" ) { Test-Foundation }
3287
3291
if ($Test -contains " xctest" ) { Test-XCTest }
3288
3292
if ($Test -contains " testing" ) { Test-Testing }
0 commit comments