@@ -730,6 +730,16 @@ enum Project {
730
730
ClangBuiltins
731
731
ClangRuntime
732
732
SwiftInspect
733
+ ExperimentalDynamicRuntime
734
+ ExperimentalDynamicOverlay
735
+ ExperimentalDynamicStringProcessing
736
+ ExperimentalDynamicSynchronization
737
+ ExperimentalDynamicDistributed
738
+ ExperimentalDynamicObservation
739
+ ExperimentalDynamicDispatch
740
+ ExperimentalDynamicDifferentiation
741
+ ExperimentalDynamicVolatile
742
+ ExperimentalDynamicFoundation
733
743
ExperimentalStaticRuntime
734
744
ExperimentalStaticOverlay
735
745
ExperimentalStaticStringProcessing
@@ -2516,49 +2526,49 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2516
2526
$RuntimeBinaryCache = if ($Static ) {
2517
2527
Get-ProjectBinaryCache $Platform ExperimentalStaticRuntime
2518
2528
} else {
2519
- throw " dynamic Experimental Runtime is not yet implemented "
2529
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicRuntime
2520
2530
}
2521
2531
2522
2532
$OverlayBinaryCache = if ($Static ) {
2523
2533
Get-ProjectBinaryCache $Platform ExperimentalStaticOverlay
2524
2534
} else {
2525
- throw " dynamic Experimental Runtime is not yet implemented "
2535
+ Get-ProjectBinarycache $Platform ExperimentalDynamicOverlay
2526
2536
}
2527
2537
2528
2538
$StringProcessingBinaryCache = if ($Static ) {
2529
2539
Get-ProjectBinarycache $Platform ExperimentalStaticStringProcessing
2530
2540
} else {
2531
- throw " dynamic Experimental Runtime is not yet implemented "
2541
+ Get-ProjectBinarycache $Platform ExperimentalDynamicStringProcessing
2532
2542
}
2533
2543
2534
2544
$SynchronizationBinaryCache = if ($Static ) {
2535
2545
Get-ProjectBinarycache $Platform ExperimentalStaticSynchronization
2536
2546
} else {
2537
- throw " dynamic Experimental Runtime is not yet implemented "
2547
+ Get-ProjectBinarycache $Platform ExperimentalDynamicSynchronization
2538
2548
}
2539
2549
2540
2550
$DistributedBinaryCache = if ($Static ) {
2541
2551
Get-ProjectBinarycache $Platform ExperimentalStaticDistributed
2542
2552
} else {
2543
- throw " dynamic Experimental Runtime is not yet implemented "
2553
+ Get-ProjectBinarycache $Platform ExperimentalDynamicDistributed
2544
2554
}
2545
2555
2546
2556
$ObservationBinaryCache = if ($Static ) {
2547
2557
Get-ProjectBinarycache $Platform ExperimentalStaticObservation
2548
2558
} else {
2549
- throw " dynamic Experimental Runtime is not yet implemented "
2559
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicObservation
2550
2560
}
2551
2561
2552
2562
$DifferentiationBinaryCache = if ($Static ) {
2553
2563
Get-ProjectBinarycache $Platform ExperimentalStaticDifferentiation
2554
2564
} else {
2555
- throw " dynamic Experimental Differentiation is not yet implemented "
2565
+ Get-ProjectBinarycache $Platform ExperimentalDynamicDifferentiation
2556
2566
}
2557
2567
2558
2568
$VolatileBinaryCache = if ($Static ) {
2559
2569
Get-ProjectBinarycache $Platform ExperimentalStaticVolatile
2560
2570
} else {
2561
- throw " dynamic Experimental Volatile is not yet implemented "
2571
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicVolatile
2562
2572
}
2563
2573
2564
2574
Build-CMakeProject `
@@ -2579,6 +2589,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2579
2589
SwiftCore_ENABLE_CONCURRENCY = " YES" ;
2580
2590
# FIXME(compnerd) remove this once the default option is flipped to `ON`.
2581
2591
SwiftCore_ENABLE_REMOTE_MIRROR = " YES" ;
2592
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2593
+ # this should be enabled when building the dynamic runtime.
2594
+ SwiftCore_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2582
2595
}
2583
2596
2584
2597
Build-CMakeProject `
@@ -2595,6 +2608,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2595
2608
2596
2609
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2597
2610
2611
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2612
+ # this should be enabled when building the dynamic runtime.
2613
+ SwiftOverlay_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2598
2614
SwiftOverlay_ENABLE_CXX_INTEROP = " YES" ;
2599
2615
}
2600
2616
@@ -2611,6 +2627,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2611
2627
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2612
2628
2613
2629
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2630
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2631
+ # this should be enabled when building the dynamic runtime.
2632
+ SwiftStringProcessing_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2614
2633
}
2615
2634
2616
2635
Build-CMakeProject `
@@ -2627,6 +2646,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2627
2646
2628
2647
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2629
2648
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2649
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2650
+ # this should be enabled when building the dynamic runtime.
2651
+ SwiftSynchronization_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2630
2652
}
2631
2653
2632
2654
Build-CMakeProject `
@@ -2645,6 +2667,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2645
2667
2646
2668
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2647
2669
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2670
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2671
+ # this should be enabled when building the dynamic runtime.
2672
+ SwiftDistributed_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2648
2673
}
2649
2674
2650
2675
Build-CMakeProject `
@@ -2663,6 +2688,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2663
2688
2664
2689
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2665
2690
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2691
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2692
+ # this should be enabled when building the dynamic runtime.
2693
+ SwiftObservation_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2666
2694
}
2667
2695
2668
2696
Build-CMakeProject `
@@ -2679,6 +2707,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2679
2707
2680
2708
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2681
2709
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2710
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2711
+ # this should be enabled when building the dynamic runtime.
2712
+ SwiftDifferentiation_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2682
2713
}
2683
2714
2684
2715
Build-CMakeProject `
@@ -3024,12 +3055,27 @@ function Build-SDK([Hashtable] $Platform, [switch] $IncludeMacros = $false) {
3024
3055
function Build-ExperimentalSDK ([Hashtable ] $Platform ) {
3025
3056
Invoke-BuildStep Build-CDispatch $Platform
3026
3057
3027
- # TODO(compnerd) we currently build the experimental SDK with just the static
3028
- # variant. We should aim to build both dynamic and static variants.
3058
+ Invoke-BuildStep Build-ExperimentalRuntime $Platform
3029
3059
Invoke-BuildStep Build-ExperimentalRuntime $Platform - Static
3030
3060
3031
3061
Invoke-IsolatingEnvVars {
3032
3062
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
3063
+
3064
+ Build-CMakeProject `
3065
+ - Src $SourceCache \swift- corelibs- libdispatch `
3066
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3067
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3068
+ - Platform $Platform `
3069
+ - UseBuiltCompilers C, CXX, Swift `
3070
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3071
+ - Defines @ {
3072
+ BUILD_SHARED_LIBS = " YES" ;
3073
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3074
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3075
+
3076
+ ENABLE_SWIFT = " YES" ;
3077
+ }
3078
+
3033
3079
Build-CMakeProject `
3034
3080
- Src $SourceCache \swift- corelibs- libdispatch `
3035
3081
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
@@ -3046,7 +3092,66 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3046
3092
}
3047
3093
}
3048
3094
3049
- Invoke-BuildStep Build-Foundation $Platform - Static
3095
+ Build-CMakeProject `
3096
+ - Src $SourceCache \swift- corelibs- foundation `
3097
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3098
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3099
+ - Platform $Platform `
3100
+ - UseBuiltCompilers ASM, C, CXX, Swift `
3101
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3102
+ - Defines @ {
3103
+ BUILD_SHARED_LIBS = " YES" ;
3104
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3105
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3106
+ ENABLE_TESTING = " NO" ;
3107
+
3108
+ FOUNDATION_BUILD_TOOLS = " NO" ;
3109
+ CURL_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\CURL" ;
3110
+ LibXml2_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\libxml2-2.11.5" ;
3111
+ ZLIB_INCLUDE_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\include" ;
3112
+ ZLIB_LIBRARY = if ($Platform.OS -eq [OS ]::Windows) {
3113
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\zlibstatic.lib"
3114
+ } else {
3115
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\libz.a"
3116
+ };
3117
+ dispatch_DIR = $ (Get-ProjectCMakeModules $Platform ExperimentalDynamicDispatch);
3118
+ SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3119
+ _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
3120
+ _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
3121
+ _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3122
+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros) \bin"
3123
+ }
3124
+
3125
+ Build-CMakeProject `
3126
+ - Src $SourceCache \swift- corelibs- foundation `
3127
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3128
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3129
+ - Platform $Platform `
3130
+ - UseBuiltCompilers ASM, C, CXX, Swift `
3131
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3132
+ - Defines @ {
3133
+ BUILD_SHARED_LIBS = " NO" ;
3134
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3135
+ CMAKE_Swift_FLAGS = @ (" -static-stdlib" , " -Xfrontend" , " -use-static-resource-dir" );
3136
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3137
+ ENABLE_TESTING = " NO" ;
3138
+
3139
+ FOUNDATION_BUILD_TOOLS = if ($Platform.OS -eq [OS ]::Windows) { " YES" } else { " NO" };
3140
+ CURL_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\CURL" ;
3141
+ LibXml2_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\libxml2-2.11.5" ;
3142
+ ZLIB_INCLUDE_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\include" ;
3143
+ ZLIB_LIBRARY = if ($Platform.OS -eq [OS ]::Windows) {
3144
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\zlibstatic.lib"
3145
+ } else {
3146
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\libz.a"
3147
+ };
3148
+ dispatch_DIR = $ (Get-ProjectCMakeModules $Platform ExperimentalStaticDispatch);
3149
+ SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3150
+ _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
3151
+ _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
3152
+ _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3153
+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros) \bin"
3154
+ }
3050
3155
}
3051
3156
3052
3157
function Build-SQLite ([Hashtable ] $Platform ) {
@@ -3759,6 +3864,11 @@ if (-not $SkipBuild) {
3759
3864
foreach ($Build in $WindowsSDKBuilds ) {
3760
3865
Invoke-BuildStep Build-ExperimentalSDK $Build
3761
3866
3867
+ Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3868
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3869
+ Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3870
+ }
3871
+
3762
3872
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3763
3873
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3764
3874
Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
@@ -3794,6 +3904,11 @@ if (-not $SkipBuild) {
3794
3904
foreach ($Build in $AndroidSDKBuilds ) {
3795
3905
Invoke-BuildStep Build-ExperimentalSDK $Build
3796
3906
3907
+ Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3908
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3909
+ Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3910
+ }
3911
+
3797
3912
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3798
3913
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3799
3914
Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
0 commit comments