@@ -109,6 +109,9 @@ The architecture where the toolchain will execute.
109
109
. PARAMETER Variant
110
110
The toolchain variant to build. Defaults to `Asserts`.
111
111
112
+ . PARAMETER FoundationTestConfiguration
113
+ Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.
114
+
112
115
. EXAMPLE
113
116
PS> .\Build.ps1
114
117
@@ -165,6 +168,8 @@ param
165
168
[switch ] $Clean ,
166
169
[switch ] $DebugInfo ,
167
170
[switch ] $EnableCaching ,
171
+ [ValidateSet (" debug" , " release" )]
172
+ [string ] $FoundationTestConfiguration = " debug" ,
168
173
[string ] $Cache = " " ,
169
174
[switch ] $Summary ,
170
175
[switch ] $ToBatch
@@ -1454,6 +1459,7 @@ function Build-SPMProject {
1454
1459
[string ] $Src ,
1455
1460
[string ] $Bin ,
1456
1461
[hashtable ] $Arch ,
1462
+ [string ] $Configuration = " release" ,
1457
1463
[Parameter (ValueFromRemainingArguments )]
1458
1464
[string []] $AdditionalArguments
1459
1465
)
@@ -1483,7 +1489,7 @@ function Build-SPMProject {
1483
1489
$Arguments = @ (
1484
1490
" --scratch-path" , $Bin ,
1485
1491
" --package-path" , $Src ,
1486
- " -c" , " release " ,
1492
+ " -c" , $Configuration ,
1487
1493
" -Xbuild-tools-swiftc" , " -I$ ( Get-SwiftSDK Windows) \usr\lib\swift" ,
1488
1494
" -Xbuild-tools-swiftc" , " -L$ ( Get-SwiftSDK Windows) \usr\lib\swift\windows" ,
1489
1495
" -Xcc" , " -I$ ( Get-SwiftSDK Windows) \usr\lib\swift" ,
@@ -2321,7 +2327,8 @@ function Build-Foundation {
2321
2327
- Action Test `
2322
2328
- Src $SourceCache \swift- foundation `
2323
2329
- Bin " $BinaryCache \$ ( $Arch.LLVMTarget ) \CoreFoundationTests" `
2324
- - Arch $HostArch
2330
+ - Arch $HostArch `
2331
+ - Configuration $FoundationTestConfiguration
2325
2332
2326
2333
$ShortArch = $Arch.LLVMName
2327
2334
Invoke-IsolatingEnvVars {
@@ -2335,7 +2342,8 @@ function Build-Foundation {
2335
2342
- Action Test `
2336
2343
- Src $SourceCache \swift- corelibs- foundation `
2337
2344
- Bin " $BinaryCache \$ ( $Arch.LLVMTarget ) \FoundationTests" `
2338
- - Arch $HostArch
2345
+ - Arch $HostArch `
2346
+ - Configuration $FoundationTestConfiguration
2339
2347
}
2340
2348
} else {
2341
2349
$FoundationBinaryCache = if ($Static ) {
0 commit comments