@@ -1391,12 +1391,18 @@ function Build-Runtime([Platform]$Platform, $Arch) {
1391
1391
}
1392
1392
1393
1393
function Build-Dispatch ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
1394
- $Targets = if ($Test ) { @ (" default" , " ExperimentalTest" ) } else { @ (" default" , " install" ) }
1394
+ if ($Test ) {
1395
+ $Targets = @ (" default" , " ExperimentalTest" )
1396
+ $InstallPath = " "
1397
+ } else {
1398
+ $Targets = @ (" default" , " install" )
1399
+ $InstallPath = " $ ( $Arch.SDKInstallRoot ) \usr"
1400
+ }
1395
1401
1396
1402
Build-CMakeProject `
1397
1403
- Src $SourceCache \swift- corelibs- libdispatch `
1398
1404
- Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
1399
- - InstallTo " $ ( $Arch .SDKInstallRoot ) \usr " `
1405
+ - InstallTo $InstallPath `
1400
1406
- Arch $Arch `
1401
1407
- Platform $Platform `
1402
1408
- UseBuiltCompilers C, CXX, Swift `
@@ -1420,16 +1426,18 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1420
1426
}
1421
1427
$Targets = @ (" default" , " test" )
1422
1428
$env: Path = " $XCTestBinaryCache ;$FoundationBinaryCache \bin;$DispatchBinaryCache ;$ ( Get-TargetProjectBinaryCache $Arch Runtime) \bin;$env: Path "
1429
+ $InstallPath = " "
1423
1430
} else {
1424
1431
$TestingDefines = @ { ENABLE_TESTING = " NO" }
1425
1432
$Targets = @ (" default" , " install" )
1433
+ $InstallPath = " $ ( $Arch.SDKInstallRoot ) \usr"
1426
1434
}
1427
1435
1428
1436
$env: CTEST_OUTPUT_ON_FAILURE = 1
1429
1437
Build-CMakeProject `
1430
1438
- Src $SourceCache \swift- corelibs- foundation `
1431
1439
- Bin $FoundationBinaryCache `
1432
- - InstallTo " $ ( $Arch .SDKInstallRoot ) \usr " `
1440
+ - InstallTo $InstallPath `
1433
1441
- Arch $Arch `
1434
1442
- Platform $Platform `
1435
1443
- UseBuiltCompilers ASM, C, Swift `
@@ -1469,16 +1477,18 @@ function Build-XCTest([Platform]$Platform, $Arch, [switch]$Test = $false) {
1469
1477
XCTEST_PATH_TO_FOUNDATION_BUILD = $FoundationBinaryCache ;
1470
1478
}
1471
1479
$Targets = @ (" default" , " check-xctest" )
1480
+ $InstallPath = " "
1472
1481
$env: Path = " $XCTestBinaryCache ;$FoundationBinaryCache \bin;$DispatchBinaryCache ;$ ( Get-TargetProjectBinaryCache $Arch Runtime) \bin;$env: Path ;$UnixToolsBinDir "
1473
1482
} else {
1474
1483
$TestingDefines = @ { ENABLE_TESTING = " NO" }
1475
1484
$Targets = @ (" default" , " install" )
1485
+ $InstallPath = " $ ( $Arch.XCTestInstallRoot ) \usr"
1476
1486
}
1477
1487
1478
1488
Build-CMakeProject `
1479
1489
- Src $SourceCache \swift- corelibs- xctest `
1480
1490
- Bin $XCTestBinaryCache `
1481
- - InstallTo " $ ( $Arch .XCTestInstallRoot ) \usr " `
1491
+ - InstallTo $InstallPath `
1482
1492
- Arch $Arch `
1483
1493
- Platform $Platform `
1484
1494
- UseBuiltCompilers Swift `
0 commit comments