@@ -107,6 +107,9 @@ The memory allocator used in the toolchain binaries, if it's
107107`mimalloc`, it uses mimalloc. Otherwise, it uses the default
108108allocator.
109109
110+ . PARAMETER FoundationTestConfiguration
111+ Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.
112+
110113. EXAMPLE
111114PS> .\Build.ps1
112115
@@ -142,6 +145,8 @@ param(
142145 [switch ] $Clean ,
143146 [switch ] $DebugInfo ,
144147 [switch ] $EnableCaching ,
148+ [ValidateSet (" debug" , " release" )]
149+ [string ] $FoundationTestConfiguration = " debug" ,
145150 [string ] $Cache = " " ,
146151 [string ] $Allocator = " " ,
147152 [switch ] $Summary ,
@@ -1262,6 +1267,7 @@ function Build-SPMProject {
12621267 [string ] $Src ,
12631268 [string ] $Bin ,
12641269 [hashtable ] $Arch ,
1270+ [string ] $Configuration = " release" ,
12651271 [Parameter (ValueFromRemainingArguments )]
12661272 [string []] $AdditionalArguments
12671273 )
@@ -1291,7 +1297,7 @@ function Build-SPMProject {
12911297 $Arguments = @ (
12921298 " --scratch-path" , $Bin ,
12931299 " --package-path" , $Src ,
1294- " -c" , " release " ,
1300+ " -c" , $Configuration ,
12951301 " -Xbuild-tools-swiftc" , " -I$SDKInstallRoot \usr\lib\swift" ,
12961302 " -Xbuild-tools-swiftc" , " -L$SDKInstallRoot \usr\lib\swift\windows" ,
12971303 " -Xcc" , " -I$SDKInstallRoot \usr\lib\swift" ,
@@ -1891,7 +1897,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
18911897 - Action Test `
18921898 - Src $SourceCache \swift- foundation `
18931899 - Bin $OutDir `
1894- - Arch $HostArch
1900+ - Arch $HostArch `
1901+ - Configuration $FoundationTestConfiguration
18951902 }
18961903
18971904 $OutDir = Join-Path - Path $HostArch.BinaryCache - ChildPath foundation- tests
@@ -1909,7 +1916,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
19091916 - Action Test `
19101917 - Src $SourceCache \swift- corelibs- foundation `
19111918 - Bin $OutDir `
1912- - Arch $HostArch
1919+ - Arch $HostArch `
1920+ - Configuration $FoundationTestConfiguration
19131921 }
19141922 } else {
19151923 $DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
0 commit comments