Skip to content

Commit 2ff8806

Browse files
committed
Fix FoundationMacro build failure in ARM64 cross-build
1 parent 552106d commit 2ff8806

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

utils/build.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,11 @@ function Build-FoundationMacros() {
23962396
[hashtable]$Arch
23972397
)
23982398

2399+
$SwiftSyntaxDir = (Get-ProjectCMakeModules $Arch Compilers)
2400+
if (-not (Test-Path $SwiftSyntaxDir)) {
2401+
throw "The swift-syntax from the compiler build for $Platform $Arch.ShortName isn't available"
2402+
}
2403+
23992404
Build-CMakeProject `
24002405
-Src $SourceCache\swift-foundation\Sources\FoundationMacros `
24012406
-Bin (Get-ProjectBinaryCache $Arch FoundationMacros) `
@@ -2405,7 +2410,7 @@ function Build-FoundationMacros() {
24052410
-UseBuiltCompilers Swift `
24062411
-SwiftSDK (Get-SwiftSDK $Platform) `
24072412
-Defines @{
2408-
SwiftSyntax_DIR = (Get-ProjectCMakeModules $HostArch Compilers);
2413+
SwiftSyntax_DIR = $SwiftSyntaxDir;
24092414
}
24102415
}
24112416

0 commit comments

Comments
 (0)