File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1481,7 +1481,7 @@ function Build-FoundationMacros() {
14811481
14821482 $SwiftSDK = $null
14831483 if ($Build ) {
1484- $SwiftSDK = $HostArch .SDKInstallRoot
1484+ $SwiftSDK = $BuildArch .SDKInstallRoot
14851485 }
14861486
14871487 $Targets = if ($Build ) {
@@ -1495,6 +1495,12 @@ function Build-FoundationMacros() {
14951495 $InstallDir = " $ ( $Arch.ToolchainInstallRoot ) \usr"
14961496 }
14971497
1498+ $SwiftSyntaxCMakeModules = if ($Build -and $HostArch -ne $BuildArch ) {
1499+ Get-BuildProjectCMakeModules Compilers
1500+ } else {
1501+ Get-HostProjectCMakeModules Compilers
1502+ }
1503+
14981504 Build-CMakeProject `
14991505 - Src $SourceCache \swift- foundation\Sources\FoundationMacros `
15001506 - Bin $FoundationMacrosBinaryCache `
@@ -1505,7 +1511,7 @@ function Build-FoundationMacros() {
15051511 - SwiftSDK:$SwiftSDK `
15061512 - BuildTargets $Targets `
15071513 - Defines @ {
1508- SwiftSyntax_DIR = ( Get-HostProjectCMakeModules Compilers) ;
1514+ SwiftSyntax_DIR = $SwiftSyntaxCMakeModules ;
15091515 }
15101516}
15111517
You can’t perform that action at this time.
0 commit comments