Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion utils/build-windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ set TMPDIR=%BuildRoot%\tmp
set NINJA_STATUS=[%%f/%%t][%%p][%%es]

:: Build the -Test argument, if any, by subtracting skipped tests
set TestArg=-Test lld,lldb,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp,
set TestArg=-Test lld,lldb,lldb-swift,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp,
for %%I in (%SKIP_TESTS%) do (call set TestArg=%%TestArg:%%I,=%%)
if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )

Expand Down
19 changes: 10 additions & 9 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Skip building the MSI installers and packaging. Useful for development builds.

.PARAMETER Test
An array of names of projects to run tests for. Use '*' to run all tests.
Available tests: lld, lldb, swift, dispatch, foundation, xctest, swift-format, sourcekit-lsp
Available tests: lld, lldb, lldb-swift, swift, dispatch, foundation, xctest, swift-format, sourcekit-lsp

.PARAMETER IncludeDS2
Include the ds2 remote debug server in the SDK.
Expand Down Expand Up @@ -258,7 +258,7 @@ if ($Test.Length -eq 1) { $Test = $Test[0].Split(",") }

if ($Test -contains "*") {
# Explicitly don't include llbuild yet since tests are known to fail on Windows
$Test = @("lld", "lldb", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
$Test = @("lld", "lldb", "lldb-swift", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
}

if ($UseHostToolchain -is [string]) {
Expand Down Expand Up @@ -1311,7 +1311,7 @@ function Get-Dependencies {
Install-PIPIfNeeded
Install-PythonModule "packaging" # For building LLVM 18+
Install-PythonModule "setuptools" # Required for SWIG support
if ($Test -contains "lldb") {
if ($Test -contains "lldb" -or $Test -contains "lldb-swift") {
Install-PythonModule "psutil" # Required for testing LLDB
}
}
Expand Down Expand Up @@ -1345,7 +1345,7 @@ function Get-Dependencies {

DownloadAndVerify $PinnedBuild "$BinaryCache\$PinnedToolchain.exe" $PinnedSHA256

if ($Test -contains "lldb") {
if ($Test -contains "lldb" -or $Test -contains "lldb-swift") {
# The make tool isn't part of MSYS
$GnuWin32MakeURL = "https://downloads.sourceforge.net/project/ezwinports/make-4.4.1-without-guile-w32-bin.zip"
$GnuWin32MakeHash = "fb66a02b530f7466f6222ce53c0b602c5288e601547a034e4156a512dd895ee7"
Expand Down Expand Up @@ -2279,17 +2279,17 @@ function Build-Compilers([Hashtable] $Platform, [string] $Variant) {
Write-PList -Settings $Settings -Path "$($Platform.ToolchainInstallRoot)\ToolchainInfo.plist"
}

function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $TestClang, [switch] $TestLLD, [switch] $TestLLDB, [switch] $TestLLVM, [switch] $TestSwift) {
function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $TestClang, [switch] $TestLLD, [switch] $TestLLDB, [switch] $TestLLDBSwift, [switch] $TestLLVM, [switch] $TestSwift) {
Invoke-IsolatingEnvVars {
$env:Path = "$(Get-CMarkBinaryCache $Platform)\src;$(Get-ProjectBinaryCache $BuildPlatform Compilers)\tools\swift\libdispatch-windows-$($Platform.Architecture.LLVMName)-prefix\bin;$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin;$env:Path;$VSInstallRoot\DIA SDK\bin\$($HostPlatform.Architecture.VSName);$UnixToolsBinDir"
$TestingDefines = Get-CompilersDefines $Platform $Variant -Test
if ($TestLLVM) { $Targets += @("check-llvm") }
if ($TestClang) { $Targets += @("check-clang") }
if ($TestLLD) { $Targets += @("check-lld") }
if ($TestSwift) { $Targets += @("check-swift", "SwiftCompilerPlugin") }
if ($TestLLDB) {
$Targets += @("check-lldb")

if ($TestLLDB) { $Targets += @("check-lldb") }
if ($TestLLDBSwift) { $Targets += @("check-lldb-swift") }
if ($TestLLDB -or $TestLLDBSwift) {
# Override test filter for known issues in downstream LLDB
Load-LitTestOverrides ([IO.Path]::GetFullPath([IO.Path]::Combine($PSScriptRoot, "..", "..", "llvm-project", "lldb", "test", "windows-swift-llvm-lit-test-overrides.txt")))

Expand Down Expand Up @@ -4368,12 +4368,13 @@ if ($Stage) {
}

if (-not $IsCrossCompiling) {
$CompilersTests = @("clang", "lld", "lldb", "llvm", "swift")
$CompilersTests = @("clang", "lld", "lldb", "lldb-swift", "llvm", "swift")
if ($Test | Where-Object { $CompilersTests -contains $_ }) {
$Tests = @{
"-TestClang" = $Test -contains "clang";
"-TestLLD" = $Test -contains "lld";
"-TestLLDB" = $Test -contains "lldb";
"-TestLLDBSwift" = $Test -contains "lldb-swift";
"-TestLLVM" = $Test -contains "llvm";
"-TestSwift" = $Test -contains "swift";
}
Expand Down