@@ -225,6 +225,7 @@ $ArchX64 = @{
225
225
BinaryCache = " $BinaryCache \x64" ;
226
226
PlatformInstallRoot = " $BinaryCache \x64\Windows.platform" ;
227
227
SDKInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\SDKs\Windows.sdk" ;
228
+ ExperimentalSDKInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\SDKs\WindowsExperimental.sdk" ;
228
229
XCTestInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\XCTest-development" ;
229
230
SwiftTestingInstallRoot = " $BinaryCache \x64\Windows.platform\Developer\Library\Testing-development" ;
230
231
ToolchainInstallRoot = " $BinaryCache \x64\toolchains\$ProductVersion +Asserts" ;
@@ -242,6 +243,7 @@ $ArchX86 = @{
242
243
BinaryCache = " $BinaryCache \x86" ;
243
244
PlatformInstallRoot = " $BinaryCache \x86\Windows.platform" ;
244
245
SDKInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\SDKs\Windows.sdk" ;
246
+ ExperimentalSDKInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\SDKs\WindowsExperimental.sdk" ;
245
247
XCTestInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\XCTest-development" ;
246
248
SwiftTestingInstallRoot = " $BinaryCache \x86\Windows.platform\Developer\Library\Testing-development" ;
247
249
Cache = @ {};
@@ -258,6 +260,7 @@ $ArchARM64 = @{
258
260
BinaryCache = " $BinaryCache \arm64" ;
259
261
PlatformInstallRoot = " $BinaryCache \arm64\Windows.platform" ;
260
262
SDKInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\SDKs\Windows.sdk" ;
263
+ ExperimentalSDKInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\SDKs\WindowsExperimental.sdk" ;
261
264
XCTestInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\XCTest-development" ;
262
265
ToolchainInstallRoot = " $BinaryCache \arm64\toolchains\$ProductVersion +Asserts" ;
263
266
SwiftTestingInstallRoot = " $BinaryCache \arm64\Windows.platform\Developer\Library\Testing-development" ;
@@ -275,6 +278,7 @@ $AndroidARM64 = @{
275
278
BinaryCache = " $BinaryCache \aarch64" ;
276
279
PlatformInstallRoot = " $BinaryCache \arm64\Android.platform" ;
277
280
SDKInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\SDKs\Android.sdk" ;
281
+ ExperimentalSDKInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk" ;
278
282
XCTestInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\XCTest-development" ;
279
283
SwiftTestingInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\Library\Testing-development" ;
280
284
Cache = @ {};
@@ -291,6 +295,7 @@ $AndroidARMv7 = @{
291
295
BinaryCache = " $BinaryCache \armv7" ;
292
296
PlatformInstallRoot = " $BinaryCache \armv7\Android.platform" ;
293
297
SDKInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\SDKs\Android.sdk" ;
298
+ ExperimentalSDKInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk" ;
294
299
XCTestInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\XCTest-development" ;
295
300
SwiftTestingInstallRoot = " $BinaryCache \armv7\Android.platform\Developer\Library\Testing-development" ;
296
301
Cache = @ {};
@@ -307,6 +312,7 @@ $AndroidX86 = @{
307
312
BinaryCache = " $BinaryCache \i686" ;
308
313
PlatformInstallRoot = " $BinaryCache \x86\Android.platform" ;
309
314
SDKInstallRoot = " $BinaryCache \x86\Android.platform\Developer\SDKs\Android.sdk" ;
315
+ ExperimentalSDKInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk" ;
310
316
XCTestInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\XCTest-development" ;
311
317
SwiftTestingInstallRoot = " $BinaryCache \x86\Android.platform\Developer\Library\Testing-development" ;
312
318
Cache = @ {};
@@ -323,6 +329,7 @@ $AndroidX64 = @{
323
329
BinaryCache = " $BinaryCache \x86_64" ;
324
330
PlatformInstallRoot = " $BinaryCache \x64\Android.platform" ;
325
331
SDKInstallRoot = " $BinaryCache \x64\Android.platform\Developer\SDKs\Android.sdk" ;
332
+ ExperimentalSDKInstallRoot = " $BinaryCache \arm64\Android.platform\Developer\SDKs\AndroidExperimental.sdk" ;
326
333
XCTestInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\XCTest-development" ;
327
334
SwiftTestingInstallRoot = " $BinaryCache \x64\Android.platform\Developer\Library\Testing-development" ;
328
335
Cache = @ {};
@@ -432,6 +439,7 @@ enum TargetComponent {
432
439
ClangBuiltins
433
440
ClangRuntime
434
441
SwiftInspect
442
+ ExperimentalRuntime
435
443
}
436
444
437
445
function Get-TargetProjectBinaryCache ($Arch , [TargetComponent ]$Project ) {
@@ -2041,6 +2049,49 @@ function Build-Runtime([Platform]$Platform, $Arch) {
2041
2049
}
2042
2050
}
2043
2051
2052
+ function Build-ExperimentalRuntime {
2053
+ [CmdletBinding (PositionalBinding = $false )]
2054
+ param
2055
+ (
2056
+ [Parameter (Position = 0 , Mandatory = $true )]
2057
+ [Platform ] $Platform ,
2058
+ [Parameter (Position = 1 , Mandatory = $true )]
2059
+ [hashtable ] $Arch ,
2060
+ [switch ] $Static = $false
2061
+ )
2062
+
2063
+ # TODO: remove this once the migration is completed.
2064
+ Isolate- EnvVars {
2065
+ Invoke-VsDevShell $BuildArch
2066
+
2067
+ Push-Location " ${SourceCache} \swift\Runtimes"
2068
+ Start-Process - Wait - WindowStyle Hidden - FilePath cmake.exe - ArgumentList @ (" -P" , " Resync.cmake" )
2069
+ Pop-Location
2070
+ }
2071
+
2072
+ Isolate- EnvVars {
2073
+ $env: Path = " $ ( Get-CMarkBinaryCache $Arch ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
2074
+
2075
+ $CompilersBinaryCache = if ($IsCrossCompiling ) {
2076
+ Get-BuildProjectBinaryCache Compilers
2077
+ } else {
2078
+ Get-HostProjectBinaryCache Compilers
2079
+ }
2080
+
2081
+ Build-CMakeProject `
2082
+ - Src $SourceCache \swift\Runtimes\Core `
2083
+ - Bin (Get-TargetProjectBinaryCache $Arch ExperimentalRuntime) `
2084
+ - InstallTo " $ ( $Arch.ExperimentalSDKInstallRoot ) \usr" `
2085
+ - Arch $Arch `
2086
+ - Platform $Platform `
2087
+ - UseBuiltCompilers C, CXX, Swift `
2088
+ - UseGNUDriver `
2089
+ - Defines @ {
2090
+ BUILD_SHARED_LIBS = if ($Static ) { " NO" } else { " YES" };
2091
+ }
2092
+ }
2093
+ }
2094
+
2044
2095
function Write-SDKSettingsPlist ([Platform ]$Platform , $Arch ) {
2045
2096
if ($Platform -eq [Platform ]::Windows) {
2046
2097
Invoke-Program " $ ( Get-PythonExecutable ) " - c " import plistlib; print(str(plistlib.dumps({ 'DefaultProperties': { 'DEFAULT_USE_RUNTIME': 'MD' } }), encoding='utf-8'))" `
@@ -3050,6 +3101,8 @@ if (-not $SkipBuild) {
3050
3101
Invoke-BuildStep Build-Testing Windows $Arch
3051
3102
Invoke-BuildStep Write-SDKSettingsPlist Windows $Arch
3052
3103
Invoke-BuildStep Write-PlatformInfoPlist $Arch
3104
+
3105
+ Invoke-BuildStep Build-ExperimentalRuntime - Static Windows $Arch
3053
3106
}
3054
3107
3055
3108
foreach ($Arch in $AndroidSDKArchs ) {
@@ -3076,6 +3129,8 @@ if (-not $SkipBuild) {
3076
3129
}
3077
3130
Invoke-BuildStep Write-SDKSettingsPlist Android $Arch
3078
3131
Invoke-BuildStep Write-PlatformInfoPlist $Arch
3132
+
3133
+ Invoke-BuildStep Build-ExperimentalRuntime - Static Android $Arch
3079
3134
}
3080
3135
3081
3136
# Build Macros for distribution
0 commit comments