@@ -888,18 +888,36 @@ function Build-BuildTools($Arch) {
888
888
}
889
889
}
890
890
891
- function Build-Compilers ($Arch , [switch ]$Test = $false ) {
891
+ function Build-Compilers () {
892
+ [CmdletBinding (PositionalBinding = $false )]
893
+ param
894
+ (
895
+ [Parameter (Position = 0 , Mandatory = $true )]
896
+ [hashtable ]$Arch ,
897
+ [switch ]$TestClang = $false ,
898
+ [switch ]$TestLLD = $false ,
899
+ [switch ]$TestLLDB = $false ,
900
+ [switch ]$TestLLVM = $false ,
901
+ [switch ]$TestSwift = $false
902
+ )
903
+
892
904
Isolate- EnvVars {
893
- if ($Test ) {
905
+ if ($TestClang -or $TestLLD -or $TestLLDB -or $TestLLVM -or $TestSwift ) {
894
906
$LibdispatchBinDir = " $BinaryCache \1\tools\swift\libdispatch-windows-$ ( $Arch.LLVMName ) -prefix\bin"
895
- $env: Path = " $LibdispatchBinDir ;$BinaryCache \1\bin;$env: Path ;$UnixToolsBinDir "
896
- $Targets = @ (" check-swift " )
907
+ $env: Path = " $LibdispatchBinDir ;$BinaryCache \1\bin;$env: Path ;$VSInstallRoot \DIA SDK\bin\ $ ( $HostArch .VSName ) ; $ UnixToolsBinDir"
908
+ $Targets = @ ()
897
909
$TestingDefines = @ {
898
910
SWIFT_BUILD_DYNAMIC_SDK_OVERLAY = " YES" ;
899
911
SWIFT_BUILD_DYNAMIC_STDLIB = " YES" ;
900
912
SWIFT_BUILD_REMOTE_MIRROR = " YES" ;
901
913
SWIFT_NATIVE_SWIFT_TOOLS_PATH = " " ;
902
914
}
915
+
916
+ if ($TestClang ) { $Targets += @ (" check-clang" ) }
917
+ if ($TestLLD ) { $Targets += @ (" check-lld" ) }
918
+ if ($TestLLDB ) { $Targets += @ (" check-lldb" ) }
919
+ if ($TestLLVM ) { $Targets += @ (" check-llvm" ) }
920
+ if ($TestSwift ) { $Targets += @ (" check-swift" ) }
903
921
} else {
904
922
$Targets = @ (" distribution" , " install-distribution" )
905
923
$TestingDefines = @ {
@@ -1801,7 +1819,17 @@ if ($Stage) {
1801
1819
Stage- BuildArtifacts $HostArch
1802
1820
}
1803
1821
1804
- if ($Test -contains " swift" ) { Build-Compilers $HostArch - Test }
1822
+ if ($Test -ne $null -and (Compare-Object $Test @ (" clang" , " lld" , " lldb" , " llvm" , " swift" ) - PassThru - IncludeEqual - ExcludeDifferent) -ne $null ) {
1823
+ $Tests = @ {
1824
+ " -TestClang" = $Test -contains " clang" ;
1825
+ " -TestLLD" = $Test -contains " lld" ;
1826
+ " -TestLLDB" = $Test -contains " lldb" ;
1827
+ " -TestLLVM" = $Test -contains " llvm" ;
1828
+ " -TestSwift" = $Test -contains " swift" ;
1829
+ }
1830
+ Build-Compilers $HostArch @Tests
1831
+ }
1832
+
1805
1833
if ($Test -contains " dispatch" ) { Build-Dispatch $HostArch - Test }
1806
1834
if ($Test -contains " foundation" ) { Build-Foundation $HostArch - Test }
1807
1835
if ($Test -contains " xctest" ) { Build-XCTest $HostArch - Test }
0 commit comments