Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ The architecture where the toolchain will execute.
.PARAMETER Variant
The toolchain variant to build. Defaults to `Asserts`.

.PARAMETER FoundationTestConfiguration
Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.

.EXAMPLE
PS> .\Build.ps1

Expand Down Expand Up @@ -165,6 +168,8 @@ param
[switch] $Clean,
[switch] $DebugInfo,
[switch] $EnableCaching,
[ValidateSet("debug", "release")]
[string] $FoundationTestConfiguration = "debug",
[string] $Cache = "",
[switch] $Summary,
[switch] $ToBatch
Expand Down Expand Up @@ -1478,6 +1483,7 @@ function Build-SPMProject {
[string] $Src,
[string] $Bin,
[hashtable] $Arch,
[string] $Configuration = "release",
[Parameter(ValueFromRemainingArguments)]
[string[]] $AdditionalArguments
)
Expand Down Expand Up @@ -1507,7 +1513,7 @@ function Build-SPMProject {
$Arguments = @(
"--scratch-path", $Bin,
"--package-path", $Src,
"-c", "release",
"-c", $Configuration,
"-Xbuild-tools-swiftc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
"-Xbuild-tools-swiftc", "-L$(Get-SwiftSDK Windows)\usr\lib\swift\windows",
"-Xcc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
Expand Down Expand Up @@ -2360,7 +2366,8 @@ function Build-Foundation {
-Action Test `
-Src $SourceCache\swift-foundation `
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
-Arch $HostArch
-Arch $HostArch `
-Configuration $FoundationTestConfiguration

$ShortArch = $Arch.LLVMName
Invoke-IsolatingEnvVars {
Expand All @@ -2374,7 +2381,8 @@ function Build-Foundation {
-Action Test `
-Src $SourceCache\swift-corelibs-foundation `
-Bin "$BinaryCache\$($Arch.LLVMTarget)\FoundationTests" `
-Arch $HostArch
-Arch $HostArch `
-Configuration $FoundationTestConfiguration
}
} else {
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
Expand Down