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 @@ -107,6 +107,9 @@ The memory allocator used in the toolchain binaries, if it's
`mimalloc`, it uses mimalloc. Otherwise, it uses the default
allocator.

.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 @@ -142,6 +145,8 @@ param(
[switch] $Clean,
[switch] $DebugInfo,
[switch] $EnableCaching,
[ValidateSet("debug", "release")]
[string] $FoundationTestConfiguration = "debug",
[string] $Cache = "",
[string] $Allocator = "",
[switch] $Summary,
Expand Down Expand Up @@ -1234,6 +1239,7 @@ function Build-SPMProject {
[string] $Src,
[string] $Bin,
[hashtable] $Arch,
[string] $Configuration = "release",
[Parameter(ValueFromRemainingArguments)]
[string[]] $AdditionalArguments
)
Expand Down Expand Up @@ -1263,7 +1269,7 @@ function Build-SPMProject {
$Arguments = @(
"--scratch-path", $Bin,
"--package-path", $Src,
"-c", "release",
"-c", $Configuration,
"-Xbuild-tools-swiftc", "-I$SDKInstallRoot\usr\lib\swift",
"-Xbuild-tools-swiftc", "-L$SDKInstallRoot\usr\lib\swift\windows",
"-Xcc", "-I$SDKInstallRoot\usr\lib\swift",
Expand Down Expand Up @@ -1851,7 +1857,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
-Action Test `
-Src $SourceCache\swift-foundation `
-Bin $OutDir `
-Arch $HostArch
-Arch $HostArch `
-Configuration $FoundationTestConfiguration
}

$OutDir = Join-Path -Path $HostArch.BinaryCache -ChildPath foundation-tests
Expand All @@ -1869,7 +1876,8 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
-Action Test `
-Src $SourceCache\swift-corelibs-foundation `
-Bin $OutDir `
-Arch $HostArch
-Arch $HostArch `
-Configuration $FoundationTestConfiguration
}
} else {
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
Expand Down