@@ -774,6 +774,16 @@ enum Project {
774
774
ClangBuiltins
775
775
ClangRuntime
776
776
SwiftInspect
777
+ ExperimentalDynamicRuntime
778
+ ExperimentalDynamicOverlay
779
+ ExperimentalDynamicStringProcessing
780
+ ExperimentalDynamicSynchronization
781
+ ExperimentalDynamicDistributed
782
+ ExperimentalDynamicObservation
783
+ ExperimentalDynamicDispatch
784
+ ExperimentalDynamicDifferentiation
785
+ ExperimentalDynamicVolatile
786
+ ExperimentalDynamicFoundation
777
787
ExperimentalStaticRuntime
778
788
ExperimentalStaticOverlay
779
789
ExperimentalStaticStringProcessing
@@ -2560,49 +2570,49 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2560
2570
$RuntimeBinaryCache = if ($Static ) {
2561
2571
Get-ProjectBinaryCache $Platform ExperimentalStaticRuntime
2562
2572
} else {
2563
- throw " dynamic Experimental Runtime is not yet implemented "
2573
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicRuntime
2564
2574
}
2565
2575
2566
2576
$OverlayBinaryCache = if ($Static ) {
2567
2577
Get-ProjectBinaryCache $Platform ExperimentalStaticOverlay
2568
2578
} else {
2569
- throw " dynamic Experimental Runtime is not yet implemented "
2579
+ Get-ProjectBinarycache $Platform ExperimentalDynamicOverlay
2570
2580
}
2571
2581
2572
2582
$StringProcessingBinaryCache = if ($Static ) {
2573
2583
Get-ProjectBinarycache $Platform ExperimentalStaticStringProcessing
2574
2584
} else {
2575
- throw " dynamic Experimental Runtime is not yet implemented "
2585
+ Get-ProjectBinarycache $Platform ExperimentalDynamicStringProcessing
2576
2586
}
2577
2587
2578
2588
$SynchronizationBinaryCache = if ($Static ) {
2579
2589
Get-ProjectBinarycache $Platform ExperimentalStaticSynchronization
2580
2590
} else {
2581
- throw " dynamic Experimental Runtime is not yet implemented "
2591
+ Get-ProjectBinarycache $Platform ExperimentalDynamicSynchronization
2582
2592
}
2583
2593
2584
2594
$DistributedBinaryCache = if ($Static ) {
2585
2595
Get-ProjectBinarycache $Platform ExperimentalStaticDistributed
2586
2596
} else {
2587
- throw " dynamic Experimental Runtime is not yet implemented "
2597
+ Get-ProjectBinarycache $Platform ExperimentalDynamicDistributed
2588
2598
}
2589
2599
2590
2600
$ObservationBinaryCache = if ($Static ) {
2591
2601
Get-ProjectBinarycache $Platform ExperimentalStaticObservation
2592
2602
} else {
2593
- throw " dynamic Experimental Runtime is not yet implemented "
2603
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicObservation
2594
2604
}
2595
2605
2596
2606
$DifferentiationBinaryCache = if ($Static ) {
2597
2607
Get-ProjectBinarycache $Platform ExperimentalStaticDifferentiation
2598
2608
} else {
2599
- throw " dynamic Experimental Differentiation is not yet implemented "
2609
+ Get-ProjectBinarycache $Platform ExperimentalDynamicDifferentiation
2600
2610
}
2601
2611
2602
2612
$VolatileBinaryCache = if ($Static ) {
2603
2613
Get-ProjectBinarycache $Platform ExperimentalStaticVolatile
2604
2614
} else {
2605
- throw " dynamic Experimental Volatile is not yet implemented "
2615
+ Get-ProjectBinaryCache $Platform ExperimentalDynamicVolatile
2606
2616
}
2607
2617
2608
2618
Build-CMakeProject `
@@ -2623,6 +2633,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2623
2633
SwiftCore_ENABLE_CONCURRENCY = " YES" ;
2624
2634
# FIXME(compnerd) remove this once the default option is flipped to `ON`.
2625
2635
SwiftCore_ENABLE_REMOTE_MIRROR = " YES" ;
2636
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2637
+ # this should be enabled when building the dynamic runtime.
2638
+ SwiftCore_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2626
2639
}
2627
2640
2628
2641
Build-CMakeProject `
@@ -2639,6 +2652,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2639
2652
2640
2653
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2641
2654
2655
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2656
+ # this should be enabled when building the dynamic runtime.
2657
+ SwiftOverlay_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2642
2658
SwiftOverlay_ENABLE_CXX_INTEROP = " YES" ;
2643
2659
}
2644
2660
@@ -2655,6 +2671,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2655
2671
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2656
2672
2657
2673
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2674
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2675
+ # this should be enabled when building the dynamic runtime.
2676
+ SwiftStringProcessing_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2658
2677
}
2659
2678
2660
2679
Build-CMakeProject `
@@ -2671,6 +2690,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2671
2690
2672
2691
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2673
2692
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2693
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2694
+ # this should be enabled when building the dynamic runtime.
2695
+ SwiftSynchronization_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2674
2696
}
2675
2697
2676
2698
Build-CMakeProject `
@@ -2689,6 +2711,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2689
2711
2690
2712
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2691
2713
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2714
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2715
+ # this should be enabled when building the dynamic runtime.
2716
+ SwiftDistributed_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2692
2717
}
2693
2718
2694
2719
Build-CMakeProject `
@@ -2707,6 +2732,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2707
2732
2708
2733
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2709
2734
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2735
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2736
+ # this should be enabled when building the dynamic runtime.
2737
+ SwiftObservation_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2710
2738
}
2711
2739
2712
2740
Build-CMakeProject `
@@ -2723,6 +2751,9 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
2723
2751
2724
2752
SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2725
2753
SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2754
+ # FIXME(compnerd) this currently causes a build failure on Windows, but
2755
+ # this should be enabled when building the dynamic runtime.
2756
+ SwiftDifferentiation_ENABLE_LIBRARY_EVOLUTION = " NO" ;
2726
2757
}
2727
2758
2728
2759
Build-CMakeProject `
@@ -3070,12 +3101,27 @@ function Build-SDK([Hashtable] $Platform, [switch] $IncludeMacros = $false) {
3070
3101
function Build-ExperimentalSDK ([Hashtable ] $Platform ) {
3071
3102
Invoke-BuildStep Build-CDispatch $Platform
3072
3103
3073
- # TODO(compnerd) we currently build the experimental SDK with just the static
3074
- # variant. We should aim to build both dynamic and static variants.
3104
+ Invoke-BuildStep Build-ExperimentalRuntime $Platform
3075
3105
Invoke-BuildStep Build-ExperimentalRuntime $Platform - Static
3076
3106
3077
3107
Invoke-IsolatingEnvVars {
3078
3108
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
3109
+
3110
+ Build-CMakeProject `
3111
+ - Src $SourceCache \swift- corelibs- libdispatch `
3112
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicDispatch) `
3113
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3114
+ - Platform $Platform `
3115
+ - UseBuiltCompilers C, CXX, Swift `
3116
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3117
+ - Defines @ {
3118
+ BUILD_SHARED_LIBS = " YES" ;
3119
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3120
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3121
+
3122
+ ENABLE_SWIFT = " YES" ;
3123
+ }
3124
+
3079
3125
Build-CMakeProject `
3080
3126
- Src $SourceCache \swift- corelibs- libdispatch `
3081
3127
- Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch) `
@@ -3092,7 +3138,66 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
3092
3138
}
3093
3139
}
3094
3140
3095
- Invoke-BuildStep Build-Foundation $Platform - Static
3141
+ Build-CMakeProject `
3142
+ - Src $SourceCache \swift- corelibs- foundation `
3143
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalDynamicFoundation) `
3144
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3145
+ - Platform $Platform `
3146
+ - UseBuiltCompilers ASM, C, CXX, Swift `
3147
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3148
+ - Defines @ {
3149
+ BUILD_SHARED_LIBS = " YES" ;
3150
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3151
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3152
+ ENABLE_TESTING = " NO" ;
3153
+
3154
+ FOUNDATION_BUILD_TOOLS = " NO" ;
3155
+ CURL_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\CURL" ;
3156
+ LibXml2_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\libxml2-2.11.5" ;
3157
+ ZLIB_INCLUDE_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\include" ;
3158
+ ZLIB_LIBRARY = if ($Platform.OS -eq [OS ]::Windows) {
3159
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\zlibstatic.lib"
3160
+ } else {
3161
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\libz.a"
3162
+ };
3163
+ dispatch_DIR = $ (Get-ProjectCMakeModules $Platform ExperimentalDynamicDispatch);
3164
+ SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3165
+ _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
3166
+ _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
3167
+ _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3168
+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros) \bin"
3169
+ }
3170
+
3171
+ Build-CMakeProject `
3172
+ - Src $SourceCache \swift- corelibs- foundation `
3173
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation) `
3174
+ - InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
3175
+ - Platform $Platform `
3176
+ - UseBuiltCompilers ASM, C, CXX, Swift `
3177
+ - SwiftSDK (Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) `
3178
+ - Defines @ {
3179
+ BUILD_SHARED_LIBS = " NO" ;
3180
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
3181
+ CMAKE_Swift_FLAGS = @ (" -static-stdlib" , " -Xfrontend" , " -use-static-resource-dir" );
3182
+ CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
3183
+ ENABLE_TESTING = " NO" ;
3184
+
3185
+ FOUNDATION_BUILD_TOOLS = if ($Platform.OS -eq [OS ]::Windows) { " YES" } else { " NO" };
3186
+ CURL_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\CURL" ;
3187
+ LibXml2_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\cmake\libxml2-2.11.5" ;
3188
+ ZLIB_INCLUDE_DIR = " $BinaryCache \$ ( $Platform.Triple ) \usr\include" ;
3189
+ ZLIB_LIBRARY = if ($Platform.OS -eq [OS ]::Windows) {
3190
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\zlibstatic.lib"
3191
+ } else {
3192
+ " $BinaryCache \$ ( $Platform.Triple ) \usr\lib\libz.a"
3193
+ };
3194
+ dispatch_DIR = $ (Get-ProjectCMakeModules $Platform ExperimentalStaticDispatch);
3195
+ SwiftSyntax_DIR = (Get-ProjectBinaryCache $HostPlatform Compilers);
3196
+ _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
3197
+ _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
3198
+ _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3199
+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros) \bin"
3200
+ }
3096
3201
}
3097
3202
3098
3203
function Build-SQLite ([Hashtable ] $Platform ) {
@@ -3805,6 +3910,11 @@ if (-not $SkipBuild) {
3805
3910
foreach ($Build in $WindowsSDKBuilds ) {
3806
3911
Invoke-BuildStep Build-ExperimentalSDK $Build
3807
3912
3913
+ Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3914
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3915
+ Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3916
+ }
3917
+
3808
3918
Get-ChildItem " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows" - Filter " *.lib" - File - ErrorAction Ignore | ForEach-Object {
3809
3919
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3810
3920
Move-Item $_.FullName " $ ( Get-SwiftSDK Windows - Identifier WindowsExperimental) \usr\lib\swift_static\windows\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
@@ -3840,6 +3950,11 @@ if (-not $SkipBuild) {
3840
3950
foreach ($Build in $AndroidSDKBuilds ) {
3841
3951
Invoke-BuildStep Build-ExperimentalSDK $Build
3842
3952
3953
+ Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3954
+ Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3955
+ Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
3956
+ }
3957
+
3843
3958
Get-ChildItem " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android" - File | Where-Object { $_.Name -match " .a$|.so$" } | ForEach-Object {
3844
3959
Write-Host - BackgroundColor DarkRed - ForegroundColor White " $ ( $_.FullName ) is not nested in an architecture directory"
3845
3960
Move-Item $_.FullName " $ ( Get-SwiftSDK Android - Identifier AndroidExperimental) \usr\lib\swift_static\android\$ ( $Build.Architecture.LLVMName ) \" | Out-Null
0 commit comments