@@ -707,15 +707,15 @@ enum Project {
707
707
ClangBuiltins
708
708
ClangRuntime
709
709
SwiftInspect
710
- ExperimentalRuntime
711
- ExperimentalOverlay
712
- ExperimentalStringProcessing
713
- ExperimentalSynchronization
714
- ExperimentalDistributed
715
- ExperimentalObservation
716
- ExperimentalDispatch
717
- ExperimentalDifferentiation
718
- StaticFoundation
710
+ ExperimentalStaticRuntime
711
+ ExperimentalStaticOverlay
712
+ ExperimentalStaticStringProcessing
713
+ ExperimentalStaticSynchronization
714
+ ExperimentalStaticDistributed
715
+ ExperimentalStaticObservation
716
+ ExperimentalStaticDifferentiation
717
+ ExperimentalStaticDispatch
718
+ ExperimentalStaticFoundation
719
719
}
720
720
721
721
function Get-ProjectBinaryCache ([Hashtable ] $Platform , [Project ] $Project ) {
@@ -2455,15 +2455,7 @@ function Test-Runtime([Hashtable] $Platform) {
2455
2455
}
2456
2456
}
2457
2457
2458
- function Build-ExperimentalRuntime {
2459
- [CmdletBinding (PositionalBinding = $false )]
2460
- param
2461
- (
2462
- [Parameter (Position = 0 , Mandatory = $true )]
2463
- [Hashtable ] $Platform ,
2464
- [switch ] $Static = $false
2465
- )
2466
-
2458
+ function Build-ExperimentalRuntime ([Hashtable ] $Platform , [switch ] $Static = $false ) {
2467
2459
# TODO: remove this once the migration is completed.
2468
2460
Invoke-IsolatingEnvVars {
2469
2461
Invoke-VsDevShell $BuildPlatform
@@ -2476,10 +2468,54 @@ function Build-ExperimentalRuntime {
2476
2468
Invoke-IsolatingEnvVars {
2477
2469
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
2478
2470
2471
+ $SDKRoot = Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental"
2472
+
2473
+ $RuntimeBinaryCache = if ($Static ) {
2474
+ Get-ProjectBinaryCache $Platform ExperimentalStaticRuntime
2475
+ } else {
2476
+ throw " dynamic Experimental Runtime is not yet implemented"
2477
+ }
2478
+
2479
+ $OverlayBinaryCache = if ($Static ) {
2480
+ Get-ProjectBinaryCache $Platform ExperimentalStaticOverlay
2481
+ } else {
2482
+ throw " dynamic Experimental Runtime is not yet implemented"
2483
+ }
2484
+
2485
+ $StringProcessingBinaryCache = if ($Static ) {
2486
+ Get-ProjectBinarycache $Platform ExperimentalStaticStringProcessing
2487
+ } else {
2488
+ throw " dynamic Experimental Runtime is not yet implemented"
2489
+ }
2490
+
2491
+ $SynchronizationBinaryCache = if ($Static ) {
2492
+ Get-ProjectBinarycache $Platform ExperimentalStaticSynchronization
2493
+ } else {
2494
+ throw " dynamic Experimental Runtime is not yet implemented"
2495
+ }
2496
+
2497
+ $DistributedBinaryCache = if ($Static ) {
2498
+ Get-ProjectBinarycache $Platform ExperimentalStaticDistributed
2499
+ } else {
2500
+ throw " dynamic Experimental Runtime is not yet implemented"
2501
+ }
2502
+
2503
+ $ObservationBinaryCache = if ($Static ) {
2504
+ Get-ProjectBinarycache $Platform ExperimentalStaticObservation
2505
+ } else {
2506
+ throw " dynamic Experimental Runtime is not yet implemented"
2507
+ }
2508
+
2509
+ $DifferentiationBinaryCache = if ($Static ) {
2510
+ Get-ProjectBinarycache $Platform ExperimentalStaticDifferentiation
2511
+ } else {
2512
+ throw " dynamic Experimental Differentiation is not yet implemented"
2513
+ }
2514
+
2479
2515
Build-CMakeProject `
2480
2516
- Src $SourceCache \swift\Runtimes\Core `
2481
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalRuntime) `
2482
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2517
+ - Bin $RuntimeBinaryCache `
2518
+ - InstallTo " ${SDKROOT} \usr" `
2483
2519
- Platform $Platform `
2484
2520
- UseBuiltCompilers C, CXX, Swift `
2485
2521
- UseGNUDriver `
@@ -2506,8 +2542,8 @@ function Build-ExperimentalRuntime {
2506
2542
2507
2543
Build-CMakeProject `
2508
2544
- Src $SourceCache \swift\Runtimes\Overlay `
2509
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalOverlay) `
2510
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2545
+ - Bin $OverlayBinaryCache `
2546
+ - InstallTo " ${SDKROOT} \usr" `
2511
2547
- Platform $Platform `
2512
2548
- UseBuiltCompilers C, CXX, Swift `
2513
2549
- UseGNUDriver `
@@ -2519,13 +2555,13 @@ function Build-ExperimentalRuntime {
2519
2555
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2520
2556
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2521
2557
2522
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2558
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2523
2559
}
2524
2560
2525
2561
Build-CMakeProject `
2526
2562
- Src $SourceCache \swift\Runtimes\Supplemental\StringProcessing `
2527
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalStringProcessing) `
2528
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2563
+ - Bin $StringProcessingBinaryCache `
2564
+ - InstallTo " ${SDKROOT} \usr" `
2529
2565
- Platform $Platform `
2530
2566
- UseBuiltCompilers C, Swift `
2531
2567
- UseGNUDriver `
@@ -2537,13 +2573,13 @@ function Build-ExperimentalRuntime {
2537
2573
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2538
2574
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2539
2575
2540
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2576
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2541
2577
}
2542
2578
2543
2579
Build-CMakeProject `
2544
2580
- Src $SourceCache \swift\Runtimes\Supplemental\Synchronization `
2545
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalSynchronization) `
2546
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2581
+ - Bin $SynchronizationBinaryCache `
2582
+ - InstallTo " ${SDKROOT} \usr" `
2547
2583
- Platform $Platform `
2548
2584
- UseBuiltCompilers C, Swift `
2549
2585
- UseGNUDriver `
@@ -2555,54 +2591,54 @@ function Build-ExperimentalRuntime {
2555
2591
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2556
2592
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2557
2593
2558
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2559
- SwiftOverlay_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalOverlay ) \cmake\SwiftOverlay" ;
2594
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2595
+ SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2560
2596
}
2561
2597
2562
2598
Build-CMakeProject `
2563
2599
- Src $SourceCache \swift\Runtimes\Supplemental\Distributed `
2564
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalDistributed) `
2565
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2600
+ - Bin $DistributedBinaryCache `
2601
+ - InstallTo " ${SDKROOT} \usr" `
2566
2602
- Platform $Platform `
2567
2603
- UseBuiltCompilers C, CXX, Swift `
2568
2604
- UseGNUDriver `
2569
2605
- Defines @ {
2570
2606
BUILD_SHARED_LIBS = if ($Static ) { " NO" } else { " YES" };
2571
2607
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
2572
- CMAKE_CXX_FLAGS = @ (" -I$ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \include" );
2608
+ CMAKE_CXX_FLAGS = @ (" -I${RuntimeBinaryCache} \include" );
2573
2609
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform );
2574
2610
CMAKE_Swift_COMPILER_WORKS = " YES" ;
2575
2611
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2576
2612
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2577
2613
2578
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2579
- SwiftOverlay_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalOverlay ) \cmake\SwiftOverlay" ;
2614
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2615
+ SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2580
2616
}
2581
2617
2582
2618
Build-CMakeProject `
2583
2619
- Src $SourceCache \swift\Runtimes\Supplemental\Observation `
2584
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalObservation) `
2585
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2620
+ - Bin $ObservationBinaryCache `
2621
+ - InstallTo " ${SDKROOT} \usr" `
2586
2622
- Platform $Platform `
2587
2623
- UseBuiltCompilers CXX, Swift `
2588
2624
- UseGNUDriver `
2589
2625
- Defines @ {
2590
2626
BUILD_SHARED_LIBS = if ($Static ) { " NO" } else { " YES" };
2591
2627
CMAKE_FIND_PACKAGE_PREFER_CONFIG = " YES" ;
2592
- CMAKE_CXX_FLAGS = @ (" -I$ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \include" );
2628
+ CMAKE_CXX_FLAGS = @ (" -I${RuntimeBinaryCache} \include" );
2593
2629
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform );
2594
2630
CMAKE_Swift_COMPILER_WORKS = " YES" ;
2595
2631
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2596
2632
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2597
2633
2598
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2599
- SwiftOverlay_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalOverlay ) \cmake\SwiftOverlay" ;
2634
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2635
+ SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2600
2636
}
2601
2637
2602
2638
Build-CMakeProject `
2603
2639
- Src $SourceCache \swift\Runtimes\Supplemental\Differentiation `
2604
- - Bin ( Get-ProjectBinaryCache $Platform ExperimentalDifferentiation) `
2605
- - InstallTo " $ ( Get-SwiftSDK $Platform .OS - Identifier " $ ( $Platform .OS ) Experimental " ) \usr" `
2640
+ - Bin $DifferentiationBinaryCache `
2641
+ - InstallTo " ${SDKROOT} \usr" `
2606
2642
- Platform $Platform `
2607
2643
- UseBuiltCompilers C, CXX, Swift `
2608
2644
- UseGNUDriver `
@@ -2614,8 +2650,8 @@ function Build-ExperimentalRuntime {
2614
2650
CMAKE_STATIC_LIBRARY_PREFIX_Swift = " lib" ;
2615
2651
CMAKE_SYSTEM_NAME = $Platform.OS.ToString ();
2616
2652
2617
- SwiftCore_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalRuntime ) \cmake\SwiftCore" ;
2618
- SwiftOverlay_DIR = " $ ( Get-ProjectBinaryCache $Platform ExperimentalOverlay ) \cmake\SwiftOverlay" ;
2653
+ SwiftCore_DIR = " ${RuntimeBinaryCache} \cmake\SwiftCore" ;
2654
+ SwiftOverlay_DIR = " ${OverlayBinaryCache} \cmake\SwiftOverlay" ;
2619
2655
}
2620
2656
}
2621
2657
}
@@ -2700,7 +2736,7 @@ function Build-Foundation {
2700
2736
)
2701
2737
2702
2738
$FoundationBinaryCache = if ($Static ) {
2703
- Get-ProjectBinaryCache $Platform StaticFoundation
2739
+ Get-ProjectBinaryCache $Platform ExperimentalStaticFoundation
2704
2740
} else {
2705
2741
Get-ProjectBinaryCache $Platform DynamicFoundation
2706
2742
}
@@ -2724,7 +2760,7 @@ function Build-Foundation {
2724
2760
}
2725
2761
2726
2762
$DispatchCMakeModules = if ($Static ) {
2727
- Get-ProjectCMakeModules $Platform ExperimentalDispatch
2763
+ Get-ProjectCMakeModules $Platform ExperimentalStaticDispatch
2728
2764
} else {
2729
2765
Get-ProjectCMakeModules $Platform Dispatch
2730
2766
}
@@ -2945,7 +2981,7 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
2945
2981
$env: Path = " $ ( Get-CMarkBinaryCache $Platform ) \src;$ ( Get-PinnedToolchainRuntime ) ;${env: Path} "
2946
2982
Build-CMakeProject `
2947
2983
- Src $SourceCache \swift- corelibs- libdispatch `
2948
- - Bin (Get-ProjectBinaryCache $Platform ExperimentalDispatch ) `
2984
+ - Bin (Get-ProjectBinaryCache $Platform ExperimentalStaticDispatch ) `
2949
2985
- InstallTo " $ ( Get-SwiftSDK $Platform.OS - Identifier " $ ( $Platform.OS ) Experimental" ) \usr" `
2950
2986
- Platform $Platform `
2951
2987
- UseBuiltCompilers C, CXX, Swift `
0 commit comments