@@ -673,15 +673,15 @@ function Get-TargetInfo([Hashtable] $Platform) {
673
673
# Cache the result of "swiftc -print-target-info" as $Platform.Cache.TargetInfo
674
674
$CacheKey = " TargetInfo"
675
675
if (-not $Platform.Cache.ContainsKey ($CacheKey )) {
676
- Invoke-IsolatingEnvVars {
676
+ [ void ]( Invoke-IsolatingEnvVars {
677
677
$env: Path = " $ ( Get-PinnedToolchainRuntime ) ;$ ( Get-PinnedToolchainToolsDir ) ;${env: Path} "
678
678
$TargetInfo = & swiftc - target $Platform.Triple - print- target- info
679
679
if ($LastExitCode -ne 0 ) {
680
680
throw " Unable to print target info for '$ ( $Platform.Triple ) '"
681
681
}
682
682
$TargetInfo = $TargetInfo | ConvertFrom-JSON
683
683
$Platform.Cache [$CacheKey ] = $TargetInfo.target
684
- }
684
+ })
685
685
}
686
686
return $Platform.Cache [$CacheKey ]
687
687
}
@@ -1354,7 +1354,7 @@ function Build-CMakeProject {
1354
1354
}
1355
1355
if ($UseBuiltCompilers.Contains (" Swift" )) {
1356
1356
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform )
1357
- $RuntimeBinaryCache = Get-ProjectBinaryCache $BuildPlatform Runtime
1357
+ $RuntimeBinaryCache = Get-ProjectBinaryCache $Platform Runtime
1358
1358
$SwiftResourceDir = " ${RuntimeBinaryCache} \lib\swift"
1359
1359
1360
1360
switch ($Platform.OS ) {
@@ -1960,8 +1960,8 @@ function Build-LLVM([Hashtable] $Platform) {
1960
1960
function Build-Sanitizers ([Hashtable ] $Platform ) {
1961
1961
$LLVMTargetCache = $ (Get-ProjectBinaryCache $Platform LLVM)
1962
1962
$LITVersionStr = $ (Invoke-Program $ (Get-PythonExecutable ) " $LLVMTargetCache \bin\llvm-lit.py" -- version)
1963
- if (-not ($LITVersionStr -match " lit (\d+)\.\d+\.\d+.*" )) {
1964
- throw " Unexpected version string output from llvm-lit.py"
1963
+ if (-not $ToBatch -and -not ($LITVersionStr -match " lit (\d+)\.\d+\.\d+.*" )) {
1964
+ throw " Unexpected version string ' $LITVersionStr ' output from llvm-lit.py"
1965
1965
}
1966
1966
$LLVMVersionMajor = $Matches.1
1967
1967
$InstallTo = " $ ( $HostPlatform.ToolchainInstallRoot ) \usr\lib\clang\$LLVMVersionMajor "
0 commit comments