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 @@ -1757,7 +1757,7 @@ function Build-FoundationMacros() {
17571757
17581758 $SwiftSDK = $null
17591759 if ($Build ) {
1760- $SwiftSDK = $HostArch .SDKInstallRoot
1760+ $SwiftSDK = $BuildArch .SDKInstallRoot
17611761 }
17621762
17631763 $Targets = if ($Build ) {
@@ -1771,6 +1771,12 @@ function Build-FoundationMacros() {
17711771 $InstallDir = " $ ( $Arch.ToolchainInstallRoot ) \usr"
17721772 }
17731773
1774+ $SwiftSyntaxCMakeModules = if ($Build -and $HostArch -ne $BuildArch ) {
1775+ Get-BuildProjectCMakeModules Compilers
1776+ } else {
1777+ Get-HostProjectCMakeModules Compilers
1778+ }
1779+
17741780 Build-CMakeProject `
17751781 - Src $SourceCache \swift- foundation\Sources\FoundationMacros `
17761782 - Bin $FoundationMacrosBinaryCache `
@@ -1781,7 +1787,7 @@ function Build-FoundationMacros() {
17811787 - SwiftSDK:$SwiftSDK `
17821788 - BuildTargets $Targets `
17831789 - Defines @ {
1784- SwiftSyntax_DIR = ( Get-HostProjectCMakeModules Compilers) ;
1790+ SwiftSyntax_DIR = $SwiftSyntaxCMakeModules ;
17851791 }
17861792}
17871793
You can’t perform that action at this time.
0 commit comments