@@ -32,8 +32,8 @@ The debug information format for C/C++ code: dwarf or codeview.
32
32
. PARAMETER SwiftDebugFormat
33
33
The debug information format for Swift code: dwarf or codeview.
34
34
35
- . PARAMETER SDKs
36
- An array of architectures for which the Swift SDK should be built.
35
+ . PARAMETER WindowsSDKs
36
+ An array of architectures for which the Windows Swift SDK should be built.
37
37
38
38
. PARAMETER ProductVersion
39
39
The product version to be used when building the installer.
@@ -84,7 +84,7 @@ in batch file format instead of executing them.
84
84
PS> .\Build.ps1
85
85
86
86
. EXAMPLE
87
- PS> .\Build.ps1 -SDKs x64 -ProductVersion 1.2.3 -Test foundation,xctest
87
+ PS> .\Build.ps1 -WindowsSDKs x64 -ProductVersion 1.2.3 -Test foundation,xctest
88
88
#>
89
89
[CmdletBinding (PositionalBinding = $false )]
90
90
param (
93
93
[string ] $ImageRoot = " S:" ,
94
94
[string ] $CDebugFormat = " dwarf" ,
95
95
[string ] $SwiftDebugFormat = " dwarf" ,
96
- [string []] $SDKs = @ (" X64" , " X86" , " Arm64" ),
96
+ [string []] $WindowsSDKs = @ (" X64" , " X86" , " Arm64" ),
97
97
[string ] $ProductVersion = " 0.0.0" ,
98
98
[string ] $PinnedBuild = " https://download.swift.org/swift-5.9-release/windows10/swift-5.9-RELEASE/swift-5.9-RELEASE-windows10.exe" ,
99
99
[string ] $PinnedSHA256 = " EAB668ABFF903B4B8111FD27F49BAD470044B6403C6FA9CCD357AE831909856D" ,
@@ -146,7 +146,7 @@ if (-not (Test-Path $python)) {
146
146
}
147
147
148
148
# Work around limitations of cmd passing in array arguments via powershell.exe -File
149
- if ($SDKs .Length -eq 1 ) { $SDKs = $SDKs [0 ].Split(" ," ) }
149
+ if ($WindowsSDKs .Length -eq 1 ) { $WindowsSDKs = $WindowsSDKs [0 ].Split(" ," ) }
150
150
if ($Test.Length -eq 1 ) { $Test = $Test [0 ].Split(" ," ) }
151
151
152
152
if ($Test -contains " *" ) {
@@ -237,7 +237,7 @@ $SDKInstallRoot = "$PlatformInstallRoot\Developer\SDKs\Windows.sdk"
237
237
$HostArch.ToolchainInstallRoot = $ToolchainInstallRoot
238
238
239
239
# Resolve the architectures received as argument
240
- $SDKArchs = @ ($SDKs | ForEach-Object {
240
+ $WindowsSDKArchs = @ ($WindowsSDKs | ForEach-Object {
241
241
switch ($_ ) {
242
242
" X64" { $ArchX64 }
243
243
" X86" { $ArchX86 }
@@ -449,6 +449,7 @@ function Fetch-Dependencies {
449
449
$ProgressPreference = " SilentlyContinue"
450
450
451
451
$WebClient = New-Object Net.WebClient
452
+
452
453
$WiXVersion = " 4.0.4"
453
454
$WiXURL = " https://www.nuget.org/api/v2/package/wix/$WiXVersion "
454
455
$WiXHash = " A9CA12214E61BB49430A8C6E5E48AC5AE6F27DC82573B5306955C4D35F2D34E2"
@@ -511,7 +512,7 @@ function Fetch-Dependencies {
511
512
$script :CustomWinSDKRoot = " $NugetRoot \$Package .$WinSDKVersion \c"
512
513
513
514
# Install each required architecture package and move files under the base /lib directory.
514
- $WinSDKArchs = $SDKArchs .Clone ()
515
+ $WinSDKArchs = $WindowsSDKArchs .Clone ()
515
516
if (-not ($HostArch -in $WinSDKArchs )) {
516
517
$WinSDKArch += $HostArch
517
518
}
@@ -1840,7 +1841,7 @@ function Build-Installer($Arch) {
1840
1841
}
1841
1842
}
1842
1843
1843
- foreach ($SDK in $SDKArchs ) {
1844
+ foreach ($SDK in $WindowsSDKArchs ) {
1844
1845
$Properties [" INCLUDE_$ ( $SDK.VSName.ToUpperInvariant ()) _SDK" ] = " true"
1845
1846
$Properties [" PLATFORM_ROOT_$ ( $SDK.VSName.ToUpperInvariant ()) " ] = " $ ( $SDK.PlatformInstallRoot ) \"
1846
1847
$Properties [" SDK_ROOT_$ ( $SDK.VSName.ToUpperInvariant ()) " ] = " $ ( $SDK.SDKInstallRoot ) \"
@@ -1854,7 +1855,7 @@ function Stage-BuildArtifacts($Arch) {
1854
1855
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \*.msi" " $Stage \"
1855
1856
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \rtl.cab" " $Stage \"
1856
1857
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $Arch.VSName ) \rtl.msi" " $Stage \"
1857
- foreach ($SDK in $SDKArchs ) {
1858
+ foreach ($SDK in $WindowsSDKArchs ) {
1858
1859
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \sdk.$ ( $SDK.VSName ) .cab" " $Stage \"
1859
1860
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \sdk.$ ( $SDK.VSName ) .msi" " $Stage \"
1860
1861
Copy-File " $ ( $Arch.BinaryCache ) \installer\Release\$ ( $SDK.VSName ) \rtl.$ ( $SDK.VSName ) .msm" " $Stage \"
@@ -1884,12 +1885,12 @@ if (-not $SkipBuild) {
1884
1885
1885
1886
if ($Clean ) {
1886
1887
2 .. 16 | % { Remove-Item - Force - Recurse " $BinaryCache \$_ " - ErrorAction Ignore }
1887
- foreach ($Arch in $SDKArchs ) {
1888
+ foreach ($Arch in $WindowsSDKArchs ) {
1888
1889
0 .. 3 | % { Remove-Item - Force - Recurse " $BinaryCache \$ ( $Arch.BuildiD + $_ ) " - ErrorAction Ignore }
1889
1890
}
1890
1891
}
1891
1892
1892
- foreach ($Arch in $SDKArchs ) {
1893
+ foreach ($Arch in $WindowsSDKArchs ) {
1893
1894
if (-not $SkipBuild ) {
1894
1895
Invoke-BuildStep Build-ZLib $Arch
1895
1896
Invoke-BuildStep Build-XML2 $Arch
@@ -1906,13 +1907,13 @@ foreach ($Arch in $SDKArchs) {
1906
1907
}
1907
1908
1908
1909
if (-not $ToBatch ) {
1909
- if ($HostArch -in $SDKArchs ) {
1910
+ if ($HostArch -in $WindowsSDKArchs ) {
1910
1911
Remove-Item - Force - Recurse $RuntimeInstallRoot - ErrorAction Ignore
1911
1912
Copy-Directory " $ ( $HostArch.SDKInstallRoot ) \usr\bin" " $RuntimeInstallRoot \usr"
1912
1913
}
1913
1914
1914
1915
Remove-Item - Force - Recurse $PlatformInstallRoot - ErrorAction Ignore
1915
- foreach ($Arch in $SDKArchs ) {
1916
+ foreach ($Arch in $WindowsSDKArchs ) {
1916
1917
Install-Platform $Arch
1917
1918
}
1918
1919
}
0 commit comments