Skip to content

Commit 3224bb4

Browse files
committed
build.ps1: add a workaround for Android build break
The C++ driver will not add in the architecture to the library search path when building for Android on Windows. Workaround this by explicitly adding in the addition library search path. Once the early swift-driver is enabled, this should be possible to remove.
1 parent 99462a6 commit 3224bb4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/build.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,11 @@ function Build-CMakeProject {
16781678
"-Xclang-linker", "-resource-dir", "-Xclang-linker", "${AndroidPrebuiltRoot}\lib\clang\$($(Get-AndroidNDK).ClangVersion)"
16791679
)
16801680

1681+
# FIXME(compnerd) remove this once we have the early swift-driver
1682+
if ($SwiftSDK) {
1683+
$SwiftFlags += @("-Xclang-linker", "-L", "-Xclang-linker", [IO.Path]::Combine($SwiftSDK, "usr", "lib", "swift", "android", $Platform.Architecture.LLVMName))
1684+
}
1685+
16811686
$SwiftFlags += if ($DebugInfo) { @("-g") } else { @("-gnone") }
16821687

16831688
Add-FlagsDefine $Defines CMAKE_Swift_FLAGS $SwiftFlags

0 commit comments

Comments
 (0)