@@ -3165,16 +3165,18 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
31653165 Invoke-BuildStep Build-ExperimentalRuntime $Platform
31663166 Invoke-BuildStep Build-ExperimentalRuntime $Platform - Static
31673167
3168+ $SDKROOT = Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental"
3169+
31683170 Invoke-IsolatingEnvVars {
31693171 $env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
31703172
31713173 Build-CMakeProject `
31723174 - Src $SourceCache \swift- corelibs- libdispatch `
31733175 - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3174- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3176+ - InstallTo " ${SDKROOT} \usr" `
31753177 - Platform $Platform `
31763178 - UseBuiltCompilers C, CXX, Swift `
3177- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3179+ - SwiftSDK " ${SDKROOT} " `
31783180 - Defines @ {
31793181 BUILD_SHARED_LIBS = " YES" ;
31803182 CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3186,10 +3188,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
31863188 Build-CMakeProject `
31873189 - Src $SourceCache \swift- corelibs- libdispatch `
31883190 - Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
3189- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3191+ - InstallTo " ${SDKROOT} \usr" `
31903192 - Platform $Platform `
31913193 - UseBuiltCompilers C, CXX, Swift `
3192- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3194+ - SwiftSDK " ${SDKROOT} " `
31933195 - Defines @ {
31943196 BUILD_SHARED_LIBS = " NO" ;
31953197 CMAKE_Swift_FLAGS = @ (" -static-stdlib" , " -Xfrontend" , " -use-static-resource-dir" );
@@ -3202,10 +3204,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
32023204 Build-CMakeProject `
32033205 - Src $SourceCache \swift- corelibs- foundation `
32043206 - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3205- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3207+ - InstallTo " ${SDKROOT} \usr" `
32063208 - Platform $Platform `
32073209 - UseBuiltCompilers ASM, C, CXX, Swift `
3208- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3210+ - SwiftSDK " ${SDKROOT} " `
32093211 - Defines @ {
32103212 BUILD_SHARED_LIBS = " YES" ;
32113213 CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3233,10 +3235,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
32333235 Build-CMakeProject `
32343236 - Src $SourceCache \swift- corelibs- foundation `
32353237 - Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3236- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3238+ - InstallTo " ${SDKROOT} \usr" `
32373239 - Platform $Platform `
32383240 - UseBuiltCompilers ASM, C, CXX, Swift `
3239- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3241+ - SwiftSDK ${SDKROOT} `
32403242 - Defines @ {
32413243 BUILD_SHARED_LIBS = " NO" ;
32423244 CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3982,14 +3984,16 @@ if (-not $SkipBuild) {
39823984 foreach ($Build in $WindowsSDKBuilds ) {
39833985 Invoke-BuildStep Build-ExperimentalSDK $Build
39843986
3987+ $SDKROOT = Get-SwiftSDK Windows - Identifier WindowsExperimental
3988+
39853989 Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
39863990 Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3987- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3991+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
39883992 }
39893993
39903994 Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
39913995 Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3992- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3996+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
39933997 }
39943998
39953999 # FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
@@ -4025,14 +4029,16 @@ if (-not $SkipBuild) {
40254029 foreach ($Build in $AndroidSDKBuilds ) {
40264030 Invoke-BuildStep Build-ExperimentalSDK $Build
40274031
4032+ $SDKROOT = Get-SwiftSDK Android - Identifier AndroidExperimental
4033+
40284034 Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
40294035 Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
4030- Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental ) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4036+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
40314037 }
40324038
40334039 Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
40344040 Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
4035- Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental ) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4041+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
40364042 }
40374043 }
40384044
0 commit comments