Skip to content

Commit 911933e

Browse files
authored
Merge pull request #76015 from hjyamauchi/buildps1
Fix another cross-compile build failure.
2 parents b7e8c11 + cc6b743 commit 911933e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

utils/build.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ function Build-TestingMacros() {
22932293

22942294
$SwiftSDK = $null
22952295
if ($Build) {
2296-
$SwiftSDK = $HostArch.SDKInstallRoot
2296+
$SwiftSDK = $BuildArch.SDKInstallRoot
22972297
}
22982298

22992299
$Targets = if ($Build) {
@@ -2307,6 +2307,12 @@ function Build-TestingMacros() {
23072307
$InstallDir = "$($Arch.ToolchainInstallRoot)\usr"
23082308
}
23092309

2310+
$SwiftSyntaxCMakeModules = if ($Build -and $HostArch -ne $BuildArch) {
2311+
Get-BuildProjectCMakeModules Compilers
2312+
} else {
2313+
Get-HostProjectCMakeModules Compilers
2314+
}
2315+
23102316
Build-CMakeProject `
23112317
-Src $SourceCache\swift-testing\Sources\TestingMacros `
23122318
-Bin $TestingMacrosBinaryCache `
@@ -2317,7 +2323,7 @@ function Build-TestingMacros() {
23172323
-SwiftSDK:$SwiftSDK `
23182324
-BuildTargets $Targets `
23192325
-Defines @{
2320-
SwiftSyntax_DIR = (Get-HostProjectCMakeModules Compilers);
2326+
SwiftSyntax_DIR = $SwiftSyntaxCMakeModules;
23212327
}
23222328
}
23232329

0 commit comments

Comments
 (0)