@@ -1895,12 +1895,17 @@ function Test-Compilers([Hashtable] $Platform, [switch] $TestClang, [switch] $Te
1895
1895
Write-Host " Copying '$RuntimeBinaryCache \bin\swiftCore.dll' to '$ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin'"
1896
1896
Copy-Item " $RuntimeBinaryCache \bin\swiftCore.dll" " $ ( Get-ProjectBinaryCache $BuildPlatform Compilers) \bin"
1897
1897
1898
+ $PythonRoot = " $ ( Get-PythonPath $BuildPlatform ) \tools"
1899
+ $env: Path = " $PythonRoot ;$env: Path "
1900
+
1898
1901
$TestingDefines += @ {
1899
1902
LLDB_INCLUDE_TESTS = " YES" ;
1900
1903
# Check for required Python modules in CMake
1901
1904
LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS = " YES" ;
1902
1905
# No watchpoint support on windows: https://github.com/llvm/llvm-project/issues/24820
1903
1906
LLDB_TEST_USER_ARGS = " --skip-category=watchpoint" ;
1907
+ # Specify the correct PYTHONHOME to LLDB in tests. Can be removed when https://github.com/swiftlang/llvm-project/pull/10811 lands.
1908
+ LLDB_TEST_COMMON_ARGS = " --env PYTHONHOME=$PythonRoot " ;
1904
1909
# gtest sharding breaks llvm-lit's --xfail and LIT_XFAIL inputs: https://github.com/llvm/llvm-project/issues/102264
1905
1910
LLVM_LIT_ARGS = " -v --no-gtest-sharding --time-tests" ;
1906
1911
# LLDB Unit tests link against this library
@@ -3387,28 +3392,30 @@ if (-not $SkipBuild) {
3387
3392
Invoke-BuildStep Build-LLBuild $HostPlatform
3388
3393
Invoke-BuildStep Build-ArgumentParser $HostPlatform
3389
3394
Invoke-BuildStep Build-Driver $HostPlatform
3390
- Invoke-BuildStep Build-Crypto $HostPlatform
3391
- Invoke-BuildStep Build-Collections $HostPlatform
3392
- Invoke-BuildStep Build-ASN1 $HostPlatform
3393
- Invoke-BuildStep Build-Certificates $HostPlatform
3394
- Invoke-BuildStep Build-System $HostPlatform
3395
- Invoke-BuildStep Build-Build $HostPlatform
3396
- Invoke-BuildStep Build-PackageManager $HostPlatform
3397
- Invoke-BuildStep Build-Markdown $HostPlatform
3398
- Invoke-BuildStep Build-Format $HostPlatform
3399
- Invoke-BuildStep Build-LMDB $HostPlatform
3400
- Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3401
- Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3402
- Invoke-BuildStep Build-Inspect $HostPlatform
3395
+ if (-not (Compare-Object $Test @ (" lldb" ))) {
3396
+ Invoke-BuildStep Build-Crypto $HostPlatform
3397
+ Invoke-BuildStep Build-Collections $HostPlatform
3398
+ Invoke-BuildStep Build-ASN1 $HostPlatform
3399
+ Invoke-BuildStep Build-Certificates $HostPlatform
3400
+ Invoke-BuildStep Build-System $HostPlatform
3401
+ Invoke-BuildStep Build-Build $HostPlatform
3402
+ Invoke-BuildStep Build-PackageManager $HostPlatform
3403
+ Invoke-BuildStep Build-Markdown $HostPlatform
3404
+ Invoke-BuildStep Build-Format $HostPlatform
3405
+ Invoke-BuildStep Build-LMDB $HostPlatform
3406
+ Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3407
+ Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3408
+ Invoke-BuildStep Build-Inspect $HostPlatform
3409
+ }
3403
3410
}
3404
3411
3405
3412
Install-HostToolchain
3406
3413
3407
- if (-not $SkipBuild ) {
3414
+ if (-not $SkipBuild -and -not ( Compare-Object $Test @ ( " lldb " )) ) {
3408
3415
Invoke-BuildStep Build-mimalloc $HostPlatform
3409
3416
}
3410
3417
3411
- if (-not $SkipBuild -and -not $IsCrossCompiling ) {
3418
+ if (-not $SkipBuild -and -not $IsCrossCompiling -and -not ( Compare-Object $Test @ ( " lldb " )) ) {
3412
3419
Invoke-BuildStep Build-DocC $HostPlatform
3413
3420
}
3414
3421
0 commit comments