Skip to content

Commit 555c6f9

Browse files
authored
Merge pull request #80636 from al45tair/fix-windows-build-2025-04-08
[Windows] Fix build issues.
2 parents 4555616 + 2bf57d7 commit 555c6f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utils/build.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,15 @@ function Get-TargetInfo([Hashtable] $Platform) {
673673
# Cache the result of "swiftc -print-target-info" as $Platform.Cache.TargetInfo
674674
$CacheKey = "TargetInfo"
675675
if (-not $Platform.Cache.ContainsKey($CacheKey)) {
676-
Invoke-IsolatingEnvVars {
676+
[void](Invoke-IsolatingEnvVars {
677677
$env:Path = "$(Get-PinnedToolchainRuntime);$(Get-PinnedToolchainToolsDir);${env:Path}"
678678
$TargetInfo = & swiftc -target $Platform.Triple -print-target-info
679679
if ($LastExitCode -ne 0) {
680680
throw "Unable to print target info for '$($Platform.Triple)'"
681681
}
682682
$TargetInfo = $TargetInfo | ConvertFrom-JSON
683683
$Platform.Cache[$CacheKey] = $TargetInfo.target
684-
}
684+
})
685685
}
686686
return $Platform.Cache[$CacheKey]
687687
}
@@ -1354,7 +1354,7 @@ function Build-CMakeProject {
13541354
}
13551355
if ($UseBuiltCompilers.Contains("Swift")) {
13561356
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_TARGET (Get-ModuleTriple $Platform)
1357-
$RuntimeBinaryCache = Get-ProjectBinaryCache $BuildPlatform Runtime
1357+
$RuntimeBinaryCache = Get-ProjectBinaryCache $Platform Runtime
13581358
$SwiftResourceDir = "${RuntimeBinaryCache}\lib\swift"
13591359

13601360
switch ($Platform.OS) {
@@ -1960,8 +1960,8 @@ function Build-LLVM([Hashtable] $Platform) {
19601960
function Build-Sanitizers([Hashtable] $Platform) {
19611961
$LLVMTargetCache = $(Get-ProjectBinaryCache $Platform LLVM)
19621962
$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"
19651965
}
19661966
$LLVMVersionMajor = $Matches.1
19671967
$InstallTo = "$($HostPlatform.ToolchainInstallRoot)\usr\lib\clang\$LLVMVersionMajor"

0 commit comments

Comments
 (0)