@@ -3165,16 +3165,18 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3165
3165
Invoke-BuildStep Build-ExperimentalRuntime $Platform
3166
3166
Invoke-BuildStep Build-ExperimentalRuntime $Platform - Static
3167
3167
3168
+ $SDKROOT = Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental"
3169
+
3168
3170
Invoke-IsolatingEnvVars {
3169
3171
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
3170
3172
3171
3173
Build-CMakeProject `
3172
3174
- Src $SourceCache \swift- corelibs- libdispatch `
3173
3175
- Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3174
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3176
+ - InstallTo " ${SDKROOT} \usr" `
3175
3177
- Platform $Platform `
3176
3178
- UseBuiltCompilers C, CXX, Swift `
3177
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3179
+ - SwiftSDK " ${SDKROOT} " `
3178
3180
- Defines @ {
3179
3181
BUILD_SHARED_LIBS = " YES" ;
3180
3182
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3186,10 +3188,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3186
3188
Build-CMakeProject `
3187
3189
- Src $SourceCache \swift- corelibs- libdispatch `
3188
3190
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
3189
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3191
+ - InstallTo " ${SDKROOT} \usr" `
3190
3192
- Platform $Platform `
3191
3193
- UseBuiltCompilers C, CXX, Swift `
3192
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3194
+ - SwiftSDK " ${SDKROOT} " `
3193
3195
- Defines @ {
3194
3196
BUILD_SHARED_LIBS = " NO" ;
3195
3197
CMAKE_Swift_FLAGS = @ (" -static-stdlib" , " -Xfrontend" , " -use-static-resource-dir" );
@@ -3202,10 +3204,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3202
3204
Build-CMakeProject `
3203
3205
- Src $SourceCache \swift- corelibs- foundation `
3204
3206
- Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3205
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3207
+ - InstallTo " ${SDKROOT} \usr" `
3206
3208
- Platform $Platform `
3207
3209
- UseBuiltCompilers ASM, C, CXX, Swift `
3208
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3210
+ - SwiftSDK " ${SDKROOT} " `
3209
3211
- Defines @ {
3210
3212
BUILD_SHARED_LIBS = " YES" ;
3211
3213
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3233,10 +3235,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3233
3235
Build-CMakeProject `
3234
3236
- Src $SourceCache \swift- corelibs- foundation `
3235
3237
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3236
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3238
+ - InstallTo " ${SDKROOT} \usr" `
3237
3239
- Platform $Platform `
3238
3240
- UseBuiltCompilers ASM, C, CXX, Swift `
3239
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3241
+ - SwiftSDK ${SDKROOT} `
3240
3242
- Defines @ {
3241
3243
BUILD_SHARED_LIBS = " NO" ;
3242
3244
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3982,14 +3984,16 @@ if (-not $SkipBuild) {
3982
3984
foreach ($Build in $WindowsSDKBuilds ) {
3983
3985
Invoke-BuildStep Build-ExperimentalSDK $Build
3984
3986
3987
+ $SDKROOT = Get-SwiftSDK Windows - Identifier WindowsExperimental
3988
+
3985
3989
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3986
3990
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
3988
3992
}
3989
3993
3990
3994
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3991
3995
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
3993
3997
}
3994
3998
3995
3999
# FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
@@ -4025,14 +4029,16 @@ if (-not $SkipBuild) {
4025
4029
foreach ($Build in $AndroidSDKBuilds ) {
4026
4030
Invoke-BuildStep Build-ExperimentalSDK $Build
4027
4031
4032
+ $SDKROOT = Get-SwiftSDK Android - Identifier AndroidExperimental
4033
+
4028
4034
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
4029
4035
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
4031
4037
}
4032
4038
4033
4039
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
4034
4040
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
4036
4042
}
4037
4043
}
4038
4044
0 commit comments