@@ -107,6 +107,9 @@ The memory allocator used in the toolchain binaries, if it's
107
107
`mimalloc`, it uses mimalloc. Otherwise, it uses the default
108
108
allocator.
109
109
110
+ . PARAMETER FoundationTestConfiguration
111
+ Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.
112
+
110
113
. EXAMPLE
111
114
PS> .\Build.ps1
112
115
@@ -142,6 +145,8 @@ param(
142
145
[switch ] $Clean ,
143
146
[switch ] $DebugInfo ,
144
147
[switch ] $EnableCaching ,
148
+ [ValidateSet (" debug" , " release" )]
149
+ [string ] $FoundationTestConfiguration = " debug" ,
145
150
[string ] $Cache = " " ,
146
151
[string ] $Allocator = " " ,
147
152
[switch ] $Summary ,
@@ -1262,6 +1267,7 @@ function Build-SPMProject {
1262
1267
[string ] $Src ,
1263
1268
[string ] $Bin ,
1264
1269
[hashtable ] $Arch ,
1270
+ [string ] $Configuration = " release" ,
1265
1271
[Parameter (ValueFromRemainingArguments )]
1266
1272
[string []] $AdditionalArguments
1267
1273
)
@@ -1291,7 +1297,7 @@ function Build-SPMProject {
1291
1297
$Arguments = @ (
1292
1298
" --scratch-path" , $Bin ,
1293
1299
" --package-path" , $Src ,
1294
- " -c" , " release " ,
1300
+ " -c" , $Configuration ,
1295
1301
" -Xbuild-tools-swiftc" , " -I$SDKInstallRoot \usr\lib\swift" ,
1296
1302
" -Xbuild-tools-swiftc" , " -L$SDKInstallRoot \usr\lib\swift\windows" ,
1297
1303
" -Xcc" , " -I$SDKInstallRoot \usr\lib\swift" ,
@@ -1891,7 +1897,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1891
1897
- Action Test `
1892
1898
- Src $SourceCache \swift- foundation `
1893
1899
- Bin $OutDir `
1894
- - Arch $HostArch
1900
+ - Arch $HostArch `
1901
+ - Configuration $FoundationTestConfiguration
1895
1902
}
1896
1903
1897
1904
$OutDir = Join-Path - Path $HostArch.BinaryCache - ChildPath foundation- tests
@@ -1909,7 +1916,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
1909
1916
- Action Test `
1910
1917
- Src $SourceCache \swift- corelibs- foundation `
1911
1918
- Bin $OutDir `
1912
- - Arch $HostArch
1919
+ - Arch $HostArch `
1920
+ - Configuration $FoundationTestConfiguration
1913
1921
}
1914
1922
} else {
1915
1923
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
0 commit comments