@@ -756,6 +756,8 @@ function Invoke-BuildStep {
756756enum Project {
757757 BuildTools
758758 RegsGen2
759+ BootstrapFoundationMacros
760+ BootstrapTestingMacros
759761
760762 CDispatch
761763 Compilers
@@ -2936,7 +2938,7 @@ function Build-Foundation([Hashtable] $Platform) {
29362938 _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
29372939 _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
29382940 _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
2939- SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros ) \bin"
2941+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros ) \bin"
29402942 }
29412943}
29422944
@@ -3045,7 +3047,7 @@ function Build-Testing([Hashtable] $Platform) {
30453047 CMAKE_INSTALL_BINDIR = $Platform.BinaryDir ;
30463048 dispatch_DIR = (Get-ProjectCMakeModules $Platform Dispatch);
30473049 Foundation_DIR = (Get-ProjectCMakeModules $Platform DynamicFoundation);
3048- SwiftTesting_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform TestingMacros ) \TestingMacros.dll" ;
3050+ SwiftTesting_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform BootstrapTestingMacros ) \TestingMacros.dll" ;
30493051 SwiftTesting_INSTALL_NESTED_SUBDIR = " YES" ;
30503052 }
30513053}
@@ -3096,7 +3098,7 @@ function Install-SDK([Hashtable[]] $Platforms, [OS] $OS = $Platforms[0].OS, [str
30963098 }
30973099}
30983100
3099- function Build-SDK ([Hashtable ] $Platform , [ switch ] $IncludeMacros = $false ) {
3101+ function Build-SDK ([Hashtable ] $Platform ) {
31003102 if ($IncludeDS2 ) {
31013103 Invoke-BuildStep Build-DS2 $Platform
31023104 }
@@ -3110,10 +3112,6 @@ function Build-SDK([Hashtable] $Platform, [switch] $IncludeMacros = $false) {
31103112 # Libraries
31113113 Invoke-BuildStep Build-Runtime $Platform
31123114 Invoke-BuildStep Build-Dispatch $Platform
3113- if ($IncludeMacros ) {
3114- Invoke-BuildStep Build-FoundationMacros $Platform
3115- Invoke-BuildStep Build-TestingMacros $Platform
3116- }
31173115 Invoke-BuildStep Build-Foundation $Platform
31183116 Invoke-BuildStep Build-Sanitizers $Platform
31193117 Invoke-BuildStep Build-XCTest $Platform
@@ -3190,7 +3188,7 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
31903188 _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
31913189 _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
31923190 _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3193- SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros ) \bin"
3191+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros ) \bin"
31943192 }
31953193
31963194 Build-CMakeProject `
@@ -3222,7 +3220,7 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
32223220 _SwiftFoundation_SourceDIR = " $SourceCache \swift-foundation" ;
32233221 _SwiftFoundationICU_SourceDIR = " $SourceCache \swift-foundation-icu" ;
32243222 _SwiftCollections_SourceDIR = " $SourceCache \swift-collections" ;
3225- SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform FoundationMacros ) \bin"
3223+ SwiftFoundation_MACRO = " $ ( Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros ) \bin"
32263224 }
32273225}
32283226
@@ -3920,7 +3918,28 @@ if (-not $SkipBuild) {
39203918 Invoke-BuildStep Build-CDispatch $HostPlatform
39213919 Invoke-BuildStep Build-Compilers $HostPlatform - Variant " Asserts"
39223920
3923- Invoke-BuildStep Build-SDK $BuildPlatform - IncludeMacros
3921+ # Build Macros
3922+ Build-CMakeProject `
3923+ - Src $SourceCache \swift- foundation\Sources\FoundationMacros `
3924+ - Bin (Get-ProjectBinaryCache $BuildPlatform BootstrapFoundationMacros) `
3925+ - BuildTargets default `
3926+ - Platform $BuildPlatform `
3927+ - UsePinnedCompilers Swift `
3928+ - SwiftSDK (Get-PinnedToolchainSDK - OS $BuildPlatform.OS ) `
3929+ - Defines @ {
3930+ SwiftSyntax_DIR = (Get-ProjectCMakeModules $BuildPlatform Compilers);
3931+ }
3932+
3933+ Build-CMakeProject `
3934+ - Src $SourceCache \swift- testing\Sources\TestingMacros `
3935+ - Bin (Get-ProjectBinaryCache $BuildPlatform BootstrapTestingMacros) `
3936+ - BuildTargets default `
3937+ - Platform $BuildPlatform `
3938+ - UsePinnedCompilers Swift `
3939+ - SwiftSDK (Get-PinnedToolchainSDK - OS $BuildPlatform.OS ) `
3940+ - Defines @ {
3941+ SwiftSyntax_DIR = (Get-ProjectCMakeModules $BuildPlatform Compilers);
3942+ }
39243943
39253944 foreach ($SDK in $WindowsSDKVersions ) {
39263945 switch ($SDK ) {
0 commit comments