Skip to content

Commit 1b1274f

Browse files
authored
Merge pull request #80125 from hjyamauchi/foundationmacros
Fix FoundationMacro build failure in ARM64 cross-build
2 parents 3c30d68 + 2ff8806 commit 1b1274f

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
@@ -2398,6 +2398,11 @@ function Build-FoundationMacros() {
23982398
[hashtable]$Arch
23992399
)
24002400

2401+
$SwiftSyntaxDir = (Get-ProjectCMakeModules $Arch Compilers)
2402+
if (-not (Test-Path $SwiftSyntaxDir)) {
2403+
throw "The swift-syntax from the compiler build for $Platform $Arch.ShortName isn't available"
2404+
}
2405+
24012406
Build-CMakeProject `
24022407
-Src $SourceCache\swift-foundation\Sources\FoundationMacros `
24032408
-Bin (Get-ProjectBinaryCache $Arch FoundationMacros) `
@@ -2407,7 +2412,7 @@ function Build-FoundationMacros() {
24072412
-UseBuiltCompilers Swift `
24082413
-SwiftSDK (Get-SwiftSDK $Platform) `
24092414
-Defines @{
2410-
SwiftSyntax_DIR = (Get-ProjectCMakeModules $HostArch Compilers);
2415+
SwiftSyntax_DIR = $SwiftSyntaxDir;
24112416
}
24122417
}
24132418

0 commit comments

Comments
 (0)