@@ -196,8 +196,12 @@ if ($Android -and ($AndroidSDKArchitectures.Length -eq 0)) {
196196}
197197
198198# Work around limitations of cmd passing in array arguments via powershell.exe -File
199+ if ($AndroidSDKVersions.Length -eq 1 ) { $AndroidSDKVersions = $AndroidSDKVersions [0 ].Split(" ," ) }
199200if ($AndroidSDKArchitectures.Length -eq 1 ) { $AndroidSDKArchitectures = $AndroidSDKArchitectures [0 ].Split(" ," ) }
201+
202+ if ($WindowsSDKVersions.Length -eq 1 ) { $WindowsSDKVersions = $WindowsSDKVersions [0 ].Split(" ," ) }
200203if ($WindowsSDKArchitectures.Length -eq 1 ) { $WindowsSDKArchitectures = $WindowsSDKArchitectures [0 ].Split(" ," ) }
204+
201205if ($Test.Length -eq 1 ) { $Test = $Test [0 ].Split(" ," ) }
202206
203207if ($AndroidSDKArchitectures.Length -gt 0 ) {
@@ -3717,52 +3721,77 @@ if (-not $SkipBuild) {
37173721
37183722 Invoke-BuildStep Build-SDK $BuildPlatform - IncludeMacros
37193723
3720- foreach ($Build in $WindowsSDKBuilds ) {
3721- Invoke-BuildStep Build-SDK $Build
3724+ foreach ($SDK in $WindowsSDKVersions ) {
3725+ switch ($SDK ) {
3726+ Windows {
3727+ foreach ($Build in $WindowsSDKBuilds ) {
3728+ Invoke-BuildStep Build-SDK $Build
37223729
3723- Get-ChildItem " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3724- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3725- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3726- }
3730+ Get-ChildItem " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3731+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3732+ Move-Item $_.FullName " $ ( Get-SwiftSDK Windows) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3733+ }
37273734
3728- Copy-Directory " $ ( Get-SwiftSDK Windows) \usr\bin" " $ ( [IO.Path ]::Combine((Get-InstallDir $Build ), " Runtimes" , $ProductVersion , " usr" )) "
3735+ # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
3736+ Copy-Directory " $ ( Get-SwiftSDK Windows) \usr\bin" " $ ( [IO.Path ]::Combine((Get-InstallDir $Build ), " Runtimes" , $ProductVersion , " usr" )) "
3737+ }
3738+
3739+ Install-SDK $WindowsSDKBuilds
3740+ Write-SDKSettings Windows
3741+ }
37293742
3730- Invoke-BuildStep Build-ExperimentalSDK $Build
3743+ WindowsExperimental {
3744+ foreach ($Build in $WindowsSDKBuilds ) {
3745+ Invoke-BuildStep Build-ExperimentalSDK $Build
3746+
3747+ Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3748+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3749+ Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3750+ }
3751+ }
37313752
3732- Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift_static\windows " - Filter " *.lib " - File - ErrorAction Ignore | ForEach-Object {
3733- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_ .FullName ) is not nested in an architecture directory "
3734- Move-Item $_ .FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift_static\windows\ $ ( $Build .Architecture.LLVMName ) \ " | Out-Null
3753+ Install-SDK $WindowsSDKBuilds - Identifier WindowsExperimental
3754+ Write-SDKSettings Windows - Identifier WindowsExperimental
3755+ }
37353756 }
37363757 }
37373758
37383759 Write-PlatformInfoPlist Windows
3739- Install-SDK $WindowsSDKBuilds
3740- Write-SDKSettings Windows
3741- Install-SDK $WindowsSDKBuilds - Identifier WindowsExperimental
3742- Write-SDKSettings Windows - Identifier WindowsExperimental
37433760
37443761 if ($Android ) {
3745- foreach ($Build in $AndroidSDKBuilds ) {
3746- Invoke-BuildStep Build-SDK $Build
3762+ foreach ($SDK in $AndroidSDKVersions ) {
3763+ switch ($SDK ) {
3764+ Android {
3765+ foreach ($Build in $AndroidSDKBuilds ) {
3766+ Invoke-BuildStep Build-SDK $Build
3767+
3768+ Get-ChildItem " $ ( Get-SwiftSDK Android) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3769+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3770+ Move-Item $_.FullName " $ ( Get-SwiftSDK Android) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3771+ }
3772+ }
37473773
3748- Get-ChildItem " $ ( Get-SwiftSDK Android) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3749- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3750- Move-Item $_.FullName " $ ( Get-SwiftSDK Android) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3751- }
3774+ Install-SDK $AndroidSDKBuilds
3775+ Write-SDKSettings Android
3776+ }
37523777
3753- Invoke-BuildStep Build-ExperimentalSDK $Build
3778+ AndroidExperimental {
3779+ foreach ($Build in $AndroidSDKBuilds ) {
3780+ Invoke-BuildStep Build-ExperimentalSDK $Build
37543781
3755- Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3756- Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3757- Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3782+ Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3783+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3784+ Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3785+ }
3786+ }
3787+
3788+ Install-SDK $AndroidSDKBuilds - Identifiers AndroidExperimental
3789+ Write-SDKSettings Android - Identifier AndroidExperimental
3790+ }
37583791 }
37593792 }
37603793
37613794 Write-PlatformInfoPlist Android
3762- Install-SDK $AndroidSDKBuilds
3763- Write-SDKSettings Android
3764- Install-SDK $AndroidSDKBuilds - Identifiers AndroidExperimental
3765- Write-SDKSettings Android - Identifier AndroidExperimental
37663795
37673796 # Android swift-inspect only supports 64-bit platforms.
37683797 $AndroidSDKBuilds | Where-Object { @ (" arm64-v8a" , " x86_64" ) -contains $_.Architecture.ABI } | ForEach-Object {
0 commit comments