Skip to content

Commit ff7d17f

Browse files
committed
build.ps1: add build for experimental Volatile module
This adds the `Volatile` module to the experimental SDK.
1 parent fa9879c commit ff7d17f

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
}
@@ -2485,6 +2486,12 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
24852486
throw "dynamic Experimental Differentiation is not yet implemented"
24862487
}
24872488

2489+
$VolatileBinaryCache = if ($Static) {
2490+
Get-ProjectBinarycache $Platform ExperimentalStaticVolatile
2491+
} else {
2492+
throw "dynamic Experimental Volatile is not yet implemented"
2493+
}
2494+
24882495
Build-CMakeProject `
24892496
-Src $SourceCache\swift\Runtimes\Core `
24902497
-Bin $RuntimeBinaryCache `
@@ -2617,6 +2624,27 @@ function Build-ExperimentalRuntime([Hashtable] $Platform, [switch] $Static = $fa
26172624
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
26182625
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
26192626
}
2627+
2628+
Build-CMakeProject `
2629+
-Src $SourceCache\swift\Runtimes\Supplemental\Volatile `
2630+
-Bin $VolatileBinaryCache `
2631+
-InstallTo "${SDKROOT}\usr" `
2632+
-Platform $Platform `
2633+
-UseBuiltCompilers Swift `
2634+
-SwiftSDK $null `
2635+
-UseGNUDriver `
2636+
-Defines @{
2637+
BUILD_SHARED_LIBS = if ($Static) { "NO" } else { "YES" };
2638+
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
2639+
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
2640+
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
2641+
2642+
SwiftCore_DIR = "${RuntimeBinaryCache}\cmake\SwiftCore";
2643+
SwiftOverlay_DIR = "${OverlayBinaryCache}\cmake\SwiftOverlay";
2644+
# FIXME(compnerd) this currently causes a build failure on Windows, but
2645+
# this should be enabled when building the dynamic runtime.
2646+
SwiftVolatile_ENABLE_LIBRARY_EVOLUTION = "NO";
2647+
}
26202648
}
26212649
}
26222650

0 commit comments

Comments
 (0)