Skip to content

Commit 8c1f84a

Browse files
committed
build.ps1: add build for experimental Volatile module
This adds the `Volatile` module to the experimental SDK.
1 parent 433865d commit 8c1f84a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

utils/build.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ enum Project {
714714
ExperimentalStaticDistributed
715715
ExperimentalStaticObservation
716716
ExperimentalStaticDifferentiation
717+
ExperimentalStaticVolatile
717718
ExperimentalStaticDispatch
718719
ExperimentalStaticFoundation
719720
}
@@ -2484,6 +2485,12 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
24842485
throw "dynamic Experimental Differentiation is not yet implemented"
24852486
}
24862487

2488+
$VolatileBinaryCache = if ($Static) {
2489+
Get-ProjectBinarycache $Platform ExperimentalStaticVolatile
2490+
} else {
2491+
throw "dynamic Experimental Volatile is not yet implemented"
2492+
}
2493+
24872494
Build-CMakeProject `
24882495
-Src $SourceCache\swift\Runtimes\Core `
24892496
-Bin $RuntimeBinaryCache `
@@ -2611,6 +2618,27 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
26112618
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
26122619
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
26132620
}
2621+
2622+
Build-CMakeProject `
2623+
-Src $SourceCache\swift\Runtimes\Supplemental\Volatile `
2624+
-Bin $VolatileBinaryCache `
2625+
-InstallTo "${SDKROOT}\usr" `
2626+
-Platform $Platform `
2627+
-UseBuiltCompilers C,Swift `
2628+
-SwiftSDK $null `
2629+
-UseGNUDriver `
2630+
-Defines @{
2631+
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
2632+
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
2633+
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2634+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2635+
2636+
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
2637+
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
2638+
# FIXME(compnerd) this currently causes a build failure on Windows, but
2639+
# this should be enabled when building the dynamic runtime.
2640+
SwiftVolatile_ENABLE_LIBRARY_EVOLUTION = "NO";
2641+
}
26142642
}
26152643
}
26162644

0 commit comments

Comments
 (0)