@@ -227,14 +227,10 @@ $NugetRoot = "$BinaryCache\nuget"
227
227
$PinnedToolchain = [IO.Path ]::GetFileNameWithoutExtension($PinnedBuild )
228
228
229
229
$LibraryRoot = " $ImageRoot \Library"
230
- $ToolchainInstallRoot = " $ ( Get-InstallDir $HostArch ) \Toolchains\$ProductVersion +Asserts"
231
- $PlatformInstallRoot = " $ ( Get-InstallDir $HostArch ) \Platforms\Windows.platform"
232
- $RuntimeInstallRoot = " $ ( Get-InstallDir $HostArch ) \Runtimes\$ProductVersion "
233
- $SDKInstallRoot = " $PlatformInstallRoot \Developer\SDKs\Windows.sdk"
234
230
235
231
# For dev productivity, install the host toolchain directly using CMake.
236
232
# This allows iterating on the toolchain using ninja builds.
237
- $HostArch.ToolchainInstallRoot = $ToolchainInstallRoot
233
+ $HostArch.ToolchainInstallRoot = " $ ( Get-InstallDir $HostArch ) \Toolchains\ $ProductVersion +Asserts "
238
234
239
235
# Resolve the architectures received as argument
240
236
$WindowsSDKArchs = @ ($WindowsSDKs | ForEach-Object {
@@ -594,9 +590,9 @@ function Build-CMakeProject {
594
590
595
591
if ($ToBatch ) {
596
592
Write-Output " "
597
- Write-Output " echo Building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) '..."
593
+ Write-Output " echo Building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) '..."
598
594
} else {
599
- Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) '..."
595
+ Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) '..."
600
596
}
601
597
602
598
$Stopwatch = [Diagnostics.Stopwatch ]::StartNew()
@@ -787,7 +783,7 @@ function Build-CMakeProject {
787
783
}
788
784
789
785
if ($UseBuiltCompilers.Contains (" Swift" )) {
790
- $env: Path = " $ ( $HostArch.SDKInstallRoot ) \usr\bin;$ToolchainInstallRoot \usr\bin;${env: Path} "
786
+ $env: Path = " $ ( $HostArch.SDKInstallRoot ) \usr\bin;$ ( $HostArch . ToolchainInstallRoot) \usr\bin;${env: Path} "
791
787
}
792
788
Invoke-Program cmake.exe @cmakeGenerateArgs
793
789
@@ -806,13 +802,13 @@ function Build-CMakeProject {
806
802
}
807
803
808
804
if (-not $ToBatch ) {
809
- Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Finished building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) ' in $ ( $Stopwatch.Elapsed ) "
805
+ Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Finished building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) ' in $ ( $Stopwatch.Elapsed ) "
810
806
Write-Host " "
811
807
}
812
808
813
809
if ($Summary ) {
814
810
$TimingData.Add ([PSCustomObject ]@ {
815
- Arch = $Arch.ShortName
811
+ Arch = $Arch.LLVMName
816
812
Checkout = $Src.Replace ($SourceCache , ' ' )
817
813
BuildID = Split-Path - Path $Bin - Leaf
818
814
" Elapsed Time" = $Stopwatch.Elapsed.ToString ()
@@ -833,15 +829,18 @@ function Build-SPMProject {
833
829
834
830
if ($ToBatch ) {
835
831
Write-Output " "
836
- Write-Output " echo Building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) '..."
832
+ Write-Output " echo Building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) '..."
837
833
} else {
838
- Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) '..."
834
+ Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) '..."
839
835
}
840
836
841
837
$Stopwatch = [Diagnostics.Stopwatch ]::StartNew()
842
838
843
839
Isolate- EnvVars {
844
- $env: Path = " $RuntimeInstallRoot \usr\bin;$ToolchainInstallRoot \usr\bin;${env: Path} "
840
+ $SDKInstallRoot = [IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " Windows.platform" , " Developer" , " SDKs" , " Windows.sdk" )
841
+ $RuntimeInstallRoot = [IO.Path ]::Combine((Get-InstallDir $HostArch ), " Runtimes" , $ProductVersion )
842
+
843
+ $env: Path = " $RuntimeInstallRoot \usr\bin;$ ( $HostArch.ToolchainInstallRoot ) \usr\bin;${env: Path} "
845
844
$env: SDKROOT = $SDKInstallRoot
846
845
847
846
$Arguments = @ (
@@ -864,17 +863,17 @@ function Build-SPMProject {
864
863
}
865
864
866
865
$Action = if ($Test ) { " test" } else { " build" }
867
- Invoke-Program " $ToolchainInstallRoot \usr\bin\swift.exe" $Action @Arguments @AdditionalArguments
866
+ Invoke-Program " $ ( $HostArch . ToolchainInstallRoot) \usr\bin\swift.exe" $Action @Arguments @AdditionalArguments
868
867
}
869
868
870
869
if (-not $ToBatch ) {
871
- Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Finished building '$Src ' to '$Bin ' for arch '$ ( $Arch.ShortName ) ' in $ ( $Stopwatch.Elapsed ) "
870
+ Write-Host - ForegroundColor Cyan " [$ ( [DateTime ]::Now.ToString(" yyyy-MM-dd HH:mm:ss" )) ] Finished building '$Src ' to '$Bin ' for arch '$ ( $Arch.LLVMName ) ' in $ ( $Stopwatch.Elapsed ) "
872
871
Write-Host " "
873
872
}
874
873
875
874
if ($Summary ) {
876
875
$TimingData.Add ([PSCustomObject ]@ {
877
- Arch = $Arch.ShortName
876
+ Arch = $Arch.LLVMName
878
877
Checkout = $Src.Replace ($SourceCache , ' ' )
879
878
BuildID = Split-Path - Path $Bin - Leaf
880
879
" Elapsed Time" = $Stopwatch.Elapsed.ToString ()
@@ -927,7 +926,7 @@ function Build-WiXProject() {
927
926
}
928
927
929
928
function Build-CMark ($Arch ) {
930
- $ArchName = $Arch.ShortName
929
+ $ArchName = $Arch.LLVMName
931
930
932
931
Build-CMakeProject `
933
932
- Src $SourceCache \cmark `
@@ -1076,7 +1075,7 @@ function Build-LLVM([Platform]$Platform, $Arch) {
1076
1075
}
1077
1076
1078
1077
function Build-ZLib ([Platform ]$Platform , $Arch ) {
1079
- $ArchName = $Arch.ShortName
1078
+ $ArchName = $Arch.LLVMName
1080
1079
1081
1080
Build-CMakeProject `
1082
1081
- Src $SourceCache \zlib `
@@ -1092,7 +1091,7 @@ function Build-ZLib([Platform]$Platform, $Arch) {
1092
1091
}
1093
1092
1094
1093
function Build-XML2 ([Platform ]$Platform , $Arch ) {
1095
- $ArchName = $Arch.ShortName
1094
+ $ArchName = $Arch.LLVMName
1096
1095
1097
1096
Build-CMakeProject `
1098
1097
- Src $SourceCache \libxml2 `
@@ -1115,7 +1114,7 @@ function Build-XML2([Platform]$Platform, $Arch) {
1115
1114
}
1116
1115
1117
1116
function Build-CURL ([Platform ]$Platform , $Arch ) {
1118
- $ArchName = $Arch.ShortName
1117
+ $ArchName = $Arch.LLVMName
1119
1118
1120
1119
Build-CMakeProject `
1121
1120
- Src $SourceCache \curl `
@@ -1208,7 +1207,7 @@ function Build-CURL([Platform]$Platform, $Arch) {
1208
1207
}
1209
1208
1210
1209
function Build-ICU ([Platform ]$Platform , $Arch ) {
1211
- $ArchName = $Arch.ShortName
1210
+ $ArchName = $Arch.LLVMName
1212
1211
1213
1212
if (-not $ToBatch ) {
1214
1213
if (-not (Test-Path - Path " $SourceCache \icu\icu4c\CMakeLists.txt" )) {
@@ -1294,7 +1293,7 @@ function Build-Dispatch([Platform]$Platform, $Arch, [switch]$Test = $false) {
1294
1293
function Build-Foundation ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
1295
1294
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
1296
1295
$FoundationBinaryCache = Get-TargetProjectBinaryCache $Arch Foundation
1297
- $ShortArch = $Arch.ShortName
1296
+ $ShortArch = $Arch.LLVMName
1298
1297
1299
1298
Isolate- EnvVars {
1300
1299
if ($Test ) {
@@ -1375,17 +1374,20 @@ function Build-XCTest([Platform]$Platform, $Arch, [switch]$Test = $false) {
1375
1374
Foundation_DIR = " $FoundationBinaryCache \cmake\modules" ;
1376
1375
} + $TestingDefines )
1377
1376
1377
+ $PList = [IO.Path ]::Combine($Arch.BinaryCache , " ${Platform} .platform" .ToLower(), " Info.plist" )
1378
1378
Invoke-Program $python - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'XCTEST_VERSION': 'development', 'SWIFTC_FLAGS': ['-use-ld=lld'] } }), encoding='utf-8'))" `
1379
- - OutFile " $ ( $Arch .PlatformInstallRoot ) \Info.plist "
1379
+ - OutFile " $PList "
1380
1380
}
1381
1381
}
1382
1382
1383
1383
# Copies files installed by CMake from the arch-specific platform root,
1384
1384
# where they follow the layout expected by the installer,
1385
1385
# to the final platform root, following the installer layout.
1386
- function Install-Platform ($Arch ) {
1386
+ function Install-Platform ([ Platform ] $Platform , $Arch ) {
1387
1387
if ($ToBatch ) { return }
1388
1388
1389
+ $SDKInstallRoot = [IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " $Platform .platform" , " Developer" , " SDKs" , " $Platform .sdk" )
1390
+
1389
1391
New-Item - ItemType Directory - ErrorAction Ignore $SDKInstallRoot \usr | Out-Null
1390
1392
1391
1393
# Copy SDK header files
@@ -1424,15 +1426,22 @@ function Install-Platform($Arch) {
1424
1426
}
1425
1427
1426
1428
# Copy plist files (same across architectures)
1427
- Copy-File " $ ( $Arch.PlatformInstallRoot ) \Info.plist" $PlatformInstallRoot \
1428
- Copy-File " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist" $SDKInstallRoot \
1429
+ Copy-File " $ ( $Arch.PlatformInstallRoot ) \Info.plist" ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " ${Platform} .platform " ))
1430
+ Copy-File " $ ( $Arch.SDKInstallRoot ) \SDKSettings.plist" ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " ${Platform} .platform " , " Developer " , " SDKs " , " ${Platform} .sdk " ))
1429
1431
1430
1432
# Copy XCTest
1431
- $XCTestInstallRoot = " $PlatformInstallRoot \Developer\Library\XCTest-development"
1432
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\bin\XCTest.dll" " $XCTestInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
1433
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\XCTest.lib" " $XCTestInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
1434
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \XCTest.swiftmodule" " $XCTestInstallRoot \usr\lib\swift\windows\XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftmodule"
1435
- Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \XCTest.swiftdoc" " $XCTestInstallRoot \usr\lib\swift\windows\XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftdoc"
1433
+ $XCTestInstallRoot = [IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " ${Platform} .platform" , " Developer" , " Library" , " XCTest-development" )
1434
+ switch ($Platform ) {
1435
+ Windows {
1436
+ Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\bin\XCTest.dll" " $XCTestInstallRoot \usr\$ ( $Arch.BinaryDir ) \"
1437
+ Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\windows\XCTest.lib" " $XCTestInstallRoot \usr\lib\swift\windows\$ ( $Arch.LLVMName ) \"
1438
+ }
1439
+ default {
1440
+ Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\libXCTest.so" " $XCTestInstallRoot \usr\lib\$ ( $Arch.BinaryDir ) \"
1441
+ }
1442
+ }
1443
+ Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLower()) \$ ( $Arch.LLVMName ) \XCTest.swiftmodule" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLower()) \XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftmodule"
1444
+ Copy-File " $ ( $Arch.XCTestInstallRoot ) \usr\lib\swift\$ ( $Platform.ToString ().ToLower()) \$ ( $Arch.LLVMName ) \XCTest.swiftdoc" " $XCTestInstallRoot \usr\lib\swift\$ ( $Platform.ToString ().ToLower()) \XCTest.swiftmodule\$ ( $Arch.LLVMTarget ) .swiftdoc"
1436
1445
}
1437
1446
1438
1447
function Build-SQLite ($Arch ) {
@@ -1488,7 +1497,7 @@ function Build-System($Arch) {
1488
1497
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1489
1498
- Arch $Arch `
1490
1499
- UseBuiltCompilers C, Swift `
1491
- - SwiftSDK $SDKInstallRoot `
1500
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1492
1501
- BuildTargets default `
1493
1502
- Defines @ {
1494
1503
BUILD_SHARED_LIBS = " YES" ;
@@ -1502,7 +1511,7 @@ function Build-ToolsSupportCore($Arch) {
1502
1511
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1503
1512
- Arch $Arch `
1504
1513
- UseBuiltCompilers C, Swift `
1505
- - SwiftSDK $SDKInstallRoot `
1514
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1506
1515
- BuildTargets default `
1507
1516
- Defines @ {
1508
1517
BUILD_SHARED_LIBS = " YES" ;
@@ -1539,7 +1548,7 @@ function Build-LLBuild($Arch, [switch]$Test = $false) {
1539
1548
- Arch $Arch `
1540
1549
- UseMSVCCompilers CXX `
1541
1550
- UseBuiltCompilers Swift `
1542
- - SwiftSDK $SDKInstallRoot `
1551
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1543
1552
- BuildTargets $Targets `
1544
1553
- Defines ($TestingDefines + @ {
1545
1554
BUILD_SHARED_LIBS = " YES" ;
@@ -1556,7 +1565,7 @@ function Build-Yams($Arch) {
1556
1565
- Bin (Get-HostProjectBinaryCache Yams) `
1557
1566
- Arch $Arch `
1558
1567
- UseBuiltCompilers Swift `
1559
- - SwiftSDK $SDKInstallRoot `
1568
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1560
1569
- BuildTargets default `
1561
1570
- Defines @ {
1562
1571
BUILD_SHARED_LIBS = " NO" ;
@@ -1571,7 +1580,7 @@ function Build-ArgumentParser($Arch) {
1571
1580
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1572
1581
- Arch $Arch `
1573
1582
- UseBuiltCompilers Swift `
1574
- - SwiftSDK $SDKInstallRoot `
1583
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1575
1584
- BuildTargets default `
1576
1585
- Defines @ {
1577
1586
BUILD_SHARED_LIBS = " YES" ;
@@ -1586,7 +1595,7 @@ function Build-Driver($Arch) {
1586
1595
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1587
1596
- Arch $Arch `
1588
1597
- UseBuiltCompilers Swift `
1589
- - SwiftSDK $SDKInstallRoot `
1598
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1590
1599
- BuildTargets default `
1591
1600
- Defines @ {
1592
1601
BUILD_SHARED_LIBS = " YES" ;
@@ -1606,7 +1615,7 @@ function Build-Crypto($Arch) {
1606
1615
- Bin (Get-HostProjectBinaryCache Crypto) `
1607
1616
- Arch $Arch `
1608
1617
- UseBuiltCompilers Swift `
1609
- - SwiftSDK $SDKInstallRoot `
1618
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1610
1619
- BuildTargets default `
1611
1620
- Defines @ {
1612
1621
BUILD_SHARED_LIBS = " NO" ;
@@ -1620,7 +1629,7 @@ function Build-Collections($Arch) {
1620
1629
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1621
1630
- Arch $Arch `
1622
1631
- UseBuiltCompilers Swift `
1623
- - SwiftSDK $SDKInstallRoot `
1632
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1624
1633
- BuildTargets default `
1625
1634
- Defines @ {
1626
1635
BUILD_SHARED_LIBS = " YES" ;
@@ -1633,7 +1642,7 @@ function Build-ASN1($Arch) {
1633
1642
- Bin (Get-HostProjectBinaryCache ASN1) `
1634
1643
- Arch $Arch `
1635
1644
- UseBuiltCompilers Swift `
1636
- - SwiftSDK $SDKInstallRoot `
1645
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1637
1646
- BuildTargets default `
1638
1647
- Defines @ {
1639
1648
BUILD_SHARED_LIBS = " NO" ;
@@ -1646,7 +1655,7 @@ function Build-Certificates($Arch) {
1646
1655
- Bin (Get-HostProjectBinaryCache Certificates) `
1647
1656
- Arch $Arch `
1648
1657
- UseBuiltCompilers Swift `
1649
- - SwiftSDK $SDKInstallRoot `
1658
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1650
1659
- BuildTargets default `
1651
1660
- Defines @ {
1652
1661
BUILD_SHARED_LIBS = " NO" ;
@@ -1668,7 +1677,7 @@ function Build-PackageManager($Arch) {
1668
1677
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1669
1678
- Arch $Arch `
1670
1679
- UseBuiltCompilers C, Swift `
1671
- - SwiftSDK $SDKInstallRoot `
1680
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1672
1681
- BuildTargets default `
1673
1682
- Defines @ {
1674
1683
BUILD_SHARED_LIBS = " YES" ;
@@ -1694,7 +1703,7 @@ function Build-Markdown($Arch) {
1694
1703
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1695
1704
- Arch $Arch `
1696
1705
- UseBuiltCompilers Swift `
1697
- - SwiftSDK $SDKInstallRoot `
1706
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1698
1707
- BuildTargets default `
1699
1708
- Defines @ {
1700
1709
BUILD_SHARED_LIBS = " NO" ;
@@ -1711,7 +1720,7 @@ function Build-Format($Arch) {
1711
1720
- Arch $Arch `
1712
1721
- UseMSVCCompilers C `
1713
1722
- UseBuiltCompilers Swift `
1714
- - SwiftSDK $SDKInstallRoot `
1723
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1715
1724
- BuildTargets default `
1716
1725
- Defines @ {
1717
1726
BUILD_SHARED_LIBS = " YES" ;
@@ -1723,6 +1732,8 @@ function Build-Format($Arch) {
1723
1732
}
1724
1733
1725
1734
function Build-IndexStoreDB ($Arch ) {
1735
+ $SDKInstallRoot = ([IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " Windows.platform" , " Developer" , " SDKs" , " Windows.sdk" ))
1736
+
1726
1737
Build-CMakeProject `
1727
1738
- Src $SourceCache \indexstore- db `
1728
1739
- Bin (Get-HostProjectBinaryCache IndexStoreDB) `
@@ -1744,7 +1755,7 @@ function Build-SourceKitLSP($Arch) {
1744
1755
- InstallTo " $ ( $Arch.ToolchainInstallRoot ) \usr" `
1745
1756
- Arch $Arch `
1746
1757
- UseBuiltCompilers C, Swift `
1747
- - SwiftSDK $SDKInstallRoot `
1758
+ - SwiftSDK ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " , " Windows.platform " , " Developer " , " SDKs " , " Windows.sdk " )) `
1748
1759
- BuildTargets default `
1749
1760
- Defines @ {
1750
1761
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
@@ -1767,20 +1778,21 @@ function Install-HostToolchain() {
1767
1778
1768
1779
# Restructure _InternalSwiftScan (keep the original one for the installer)
1769
1780
Copy-Item - Force `
1770
- $ ToolchainInstallRoot \usr\lib\swift\_InternalSwiftScan `
1771
- $ ToolchainInstallRoot \usr\include
1781
+ " $ ( $HostArch . ToolchainInstallRoot) \usr\lib\swift\_InternalSwiftScan" `
1782
+ " $ ( $HostArch . ToolchainInstallRoot) \usr\include"
1772
1783
Copy-Item - Force `
1773
- $ ToolchainInstallRoot \usr\lib\swift\windows\_InternalSwiftScan.lib `
1774
- $ ToolchainInstallRoot \usr\lib
1784
+ " $ ( $HostArch . ToolchainInstallRoot) \usr\lib\swift\windows\_InternalSwiftScan.lib" `
1785
+ " $ ( $HostArch . ToolchainInstallRoot) \usr\lib"
1775
1786
1776
1787
# Switch to swift-driver
1777
1788
$SwiftDriver = ([IO.Path ]::Combine((Get-HostProjectBinaryCache Driver), " bin" , " swift-driver.exe" ))
1778
- Copy-Item - Force $SwiftDriver $ ToolchainInstallRoot \usr\bin\swift.exe
1779
- Copy-Item - Force $SwiftDriver $ ToolchainInstallRoot \usr\bin\swiftc.exe
1789
+ Copy-Item - Force $SwiftDriver " $ ( $HostArch . ToolchainInstallRoot) \usr\bin\swift.exe"
1790
+ Copy-Item - Force $SwiftDriver " $ ( $HostArch . ToolchainInstallRoot) \usr\bin\swiftc.exe"
1780
1791
}
1781
1792
1782
1793
function Build-Inspect () {
1783
1794
$OutDir = Join-Path - Path $HostArch.BinaryCache - ChildPath swift- inspect
1795
+ $SDKInstallRoot = ([IO.Path ]::Combine((Get-InstallDir $HostArch ), " Platforms" , " Windows.platform" , " Developer" , " SDKs" , " Windows.sdk" )) `
1784
1796
1785
1797
Isolate- EnvVars {
1786
1798
$env: SWIFTCI_USE_LOCAL_DEPS = 1
@@ -1912,13 +1924,15 @@ if (-not $SkipBuild) {
1912
1924
1913
1925
if (-not $ToBatch ) {
1914
1926
if ($HostArch -in $WindowsSDKArchs ) {
1927
+ $RuntimeInstallRoot = [IO.Path ]::Combine((Get-InstallDir $HostArch ), " Runtimes" , $ProductVersion )
1928
+
1915
1929
Remove-Item - Force - Recurse $RuntimeInstallRoot - ErrorAction Ignore
1916
1930
Copy-Directory " $ ( $HostArch.SDKInstallRoot ) \usr\bin" " $RuntimeInstallRoot \usr"
1917
1931
}
1918
1932
1919
- Remove-Item - Force - Recurse $PlatformInstallRoot - ErrorAction Ignore
1933
+ Remove-Item - Force - Recurse ([ IO.Path ]::Combine(( Get-InstallDir $HostArch ) , " Platforms " )) - ErrorAction Ignore
1920
1934
foreach ($Arch in $WindowsSDKArchs ) {
1921
- Install-Platform $Arch
1935
+ Install-Platform Windows $Arch
1922
1936
}
1923
1937
}
1924
1938
0 commit comments