Skip to content

Commit 7852463

Browse files
committed
[build.ps1] add host SDK path when building foundation for Android on windows
This lets us build the FoundationMacros for the windows host
1 parent 741cd47 commit 7852463

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
@@ -1640,6 +1640,11 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
16401640
$Targets = @("default", "install")
16411641
$InstallPath = "$($Arch.SDKInstallRoot)\usr"
16421642
}
1643+
if ($Platform -eq "Android") {
1644+
$HostDefines = @{ CMAKE_HOST_Swift_FLAGS = "-sdk `"$($HostArch.SDKInstallRoot)`"" }
1645+
} else {
1646+
$HostDefines = @{}
1647+
}
16431648

16441649
$env:CTEST_OUTPUT_ON_FAILURE = 1
16451650
Build-CMakeProject `
@@ -1671,7 +1676,7 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
16711676
_SwiftFoundation_SourceDIR = "$SourceCache\swift-foundation";
16721677
_SwiftFoundationICU_SourceDIR = "$SourceCache\swift-foundation-icu";
16731678
_SwiftCollections_SourceDIR = "$SourceCache\swift-collections"
1674-
} + $TestingDefines)
1679+
} + $HostDefines + $TestingDefines)
16751680
}
16761681
}
16771682

0 commit comments

Comments
 (0)