Skip to content

Commit

Permalink
Word Around Android Build Failures (#3883)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Sep 26, 2023
1 parent 9c903ab commit 4ef3731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -482,16 +482,16 @@ function CMake-Generate {
$Arguments += " -DQUIC_HIGH_RES_TIMERS=on"
}
if ($Platform -eq "android") {
$env:PATH = "$env:ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$env:PATH"
$NDK = $env:ANDROID_NDK_LATEST_HOME.Replace('26.0.10792818', '25.2.9519653') # Temporary work around
$env:PATH = "$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin:$env:PATH"
switch ($Arch) {
"x86" { $Arguments += " -DANDROID_ABI=x86"}
"x64" { $Arguments += " -DANDROID_ABI=x86_64" }
"arm" { $Arguments += " -DANDROID_ABI=armeabi-v7a" }
"arm64" { $Arguments += " -DANDROID_ABI=arm64-v8a" }
}
$Arguments += " -DANDROID_PLATFORM=android-29"
$NDK = $env:ANDROID_NDK_LATEST_HOME
$env:ANDROID_NDK_HOME = $env:ANDROID_NDK_LATEST_HOME
$env:ANDROID_NDK_HOME = $NDK
$NdkToolchainFile = "$NDK/build/cmake/android.toolchain.cmake"
$Arguments += " -DANDROID_NDK=""$NDK"""
$Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$NdkToolchainFile"""
Expand Down

0 comments on commit 4ef3731

Please sign in to comment.