@@ -3169,16 +3169,18 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3169
3169
Invoke-BuildStep Build-ExperimentalRuntime $Platform
3170
3170
Invoke-BuildStep Build-ExperimentalRuntime $Platform - Static
3171
3171
3172
+ $SDKROOT = Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental"
3173
+
3172
3174
Invoke-IsolatingEnvVars {
3173
3175
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
3174
3176
3175
3177
Build-CMakeProject `
3176
3178
- Src $SourceCache \swift- corelibs- libdispatch `
3177
3179
- Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3178
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3180
+ - InstallTo " ${SDKROOT} \usr" `
3179
3181
- Platform $Platform `
3180
3182
- UseBuiltCompilers C, CXX, Swift `
3181
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3183
+ - SwiftSDK " ${SDKROOT} " `
3182
3184
- Defines @ {
3183
3185
BUILD_SHARED_LIBS = " YES" ;
3184
3186
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3190,10 +3192,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3190
3192
Build-CMakeProject `
3191
3193
- Src $SourceCache \swift- corelibs- libdispatch `
3192
3194
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
3193
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3195
+ - InstallTo " ${SDKROOT} \usr" `
3194
3196
- Platform $Platform `
3195
3197
- UseBuiltCompilers C, CXX, Swift `
3196
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3198
+ - SwiftSDK " ${SDKROOT} " `
3197
3199
- Defines @ {
3198
3200
BUILD_SHARED_LIBS = " NO" ;
3199
3201
CMAKE_Swift_FLAGS = @ (" -static-stdlib" , " -Xfrontend" , " -use-static-resource-dir" );
@@ -3206,10 +3208,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3206
3208
Build-CMakeProject `
3207
3209
- Src $SourceCache \swift- corelibs- foundation `
3208
3210
- Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3209
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3211
+ - InstallTo " ${SDKROOT} \usr" `
3210
3212
- Platform $Platform `
3211
3213
- UseBuiltCompilers ASM, C, CXX, Swift `
3212
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3214
+ - SwiftSDK " ${SDKROOT} " `
3213
3215
- Defines @ {
3214
3216
BUILD_SHARED_LIBS = " YES" ;
3215
3217
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3237,10 +3239,10 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3237
3239
Build-CMakeProject `
3238
3240
- Src $SourceCache \swift- corelibs- foundation `
3239
3241
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3240
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
3242
+ - InstallTo " ${SDKROOT} \usr" `
3241
3243
- Platform $Platform `
3242
3244
- UseBuiltCompilers ASM, C, CXX, Swift `
3243
- - SwiftSDK ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) `
3245
+ - SwiftSDK ${SDKROOT} `
3244
3246
- Defines @ {
3245
3247
BUILD_SHARED_LIBS = " NO" ;
3246
3248
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
@@ -3986,14 +3988,16 @@ if (-not $SkipBuild) {
3986
3988
foreach ($Build in $WindowsSDKBuilds ) {
3987
3989
Invoke-BuildStep Build-ExperimentalSDK $Build
3988
3990
3991
+ $SDKROOT = Get-SwiftSDK Windows - Identifier WindowsExperimental
3992
+
3989
3993
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3990
3994
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3991
- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3995
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3992
3996
}
3993
3997
3994
3998
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3995
3999
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3996
- Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental ) \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4000
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3997
4001
}
3998
4002
3999
4003
# FIXME(compnerd) how do we select which SDK is meant to be re-distributed?
@@ -4029,14 +4033,16 @@ if (-not $SkipBuild) {
4029
4033
foreach ($Build in $AndroidSDKBuilds ) {
4030
4034
Invoke-BuildStep Build-ExperimentalSDK $Build
4031
4035
4036
+ $SDKROOT = Get-SwiftSDK Android - Identifier AndroidExperimental
4037
+
4032
4038
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
4033
4039
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
4034
- Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental ) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4040
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4035
4041
}
4036
4042
4037
4043
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
4038
4044
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
4039
- Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental ) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4045
+ Move-Item $_.FullName " $SDKROOT \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
4040
4046
}
4041
4047
}
4042
4048
0 commit comments