Skip to content

Commit

Permalink
Go back to NDK 21
Browse files Browse the repository at this point in the history
This is a partial revert of 796716c
Rust's libstd is built against a lower NDK.
Newer NDKs have replaced libgcc with libunwind. This breaks the built
now (see rust-lang/rust#85806).
Additionally some tooling changed so now the rust-android-gradle plugin breaks.
For now we drop back to the old NDK until we invest time to do a proper
upgrade.
  • Loading branch information
badboy committed Aug 11, 2022
1 parent 796716c commit dee4e7a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ commands:
command: |
sdkmanager \
"build-tools;33.0.0" \
"ndk;25.0.8775105"
"ndk;21.3.6528147"
android-setup:
steps:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ buildscript {
]

ext.build = [
ndkVersion: "25.0.8775105", // Keep it in sync in TC Dockerfile.
ndkVersion: "21.3.6528147", // Keep it in sync in TC Dockerfile.
compileSdkVersion: 32,
targetSdkVersion: 32,
minSdkVersion: 21, // So that we can publish for aarch64.
Expand Down
6 changes: 3 additions & 3 deletions docs/dev/android/sdk-ndk-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The Glean SDK implementation is currently build against the following versions:
* or install with: `sdkmanager --verbose "platforms;android-32"`
* Android Command line tools
* Download link: <https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip>
* NDK r25
* Download link: <https://dl.google.com/android/repository/android-ndk-r25-linux-x86_64.zip>
* NDK r21
* Download link: <https://dl.google.com/android/repository/android-ndk-r21-linux-x86_64.zip>

For the full setup see [Setup the Android Build Environment](setup-android-build-environment.html).

Expand All @@ -26,4 +26,4 @@ All locations need to be updated on upgrades:
* `ENV ANDROID_BUILD_TOOLS "33.0.0"`
* `ENV ANDROID_SDK_VERSION "8512546"`
* `ENV ANDROID_PLATFORM_VERSION "32"`
* `ENV ANDROID_NDK_VERSION "25.0.8775105"`
* `ENV ANDROID_NDK_VERSION "21.3.6528147"`
6 changes: 3 additions & 3 deletions docs/dev/android/setup-android-build-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If Android Studio asks you to upgrade the version of Gradle, decline.
The following dependencies can be installed in Android Studio through `Tools > SDK Manager > SDK Tools`:

- Android SDK Tools (may already be selected)
- NDK r25
- NDK r21
- CMake
- LLDB

Expand All @@ -46,10 +46,10 @@ sdk.dir=/path/to/sdk
For the Android NDK:

1. Download NDK r21 from <https://developer.android.com/ndk/downloads>.
2. Extract it and put it somewhere (`$HOME/.android-ndk-r25` is a reasonable choice, but it doesn't matter).
2. Extract it and put it somewhere (`$HOME/.android-ndk-r21` is a reasonable choice, but it doesn't matter).
3. Add the following line to the `local.properties` file in the root of the Glean checkout (create the file if it does not exist):
```
ndk.dir=/path/to/.android-ndk-r25
ndk.dir=/path/to/.android-ndk-r21
```

### Setting up Rust
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WORKDIR /builds/worker/
ENV ANDROID_BUILD_TOOLS "33.0.0"
ENV ANDROID_TOOLS_VERSION "8512546"
ENV ANDROID_PLATFORM_VERSION "32"
ENV ANDROID_NDK_VERSION "25.0.8775105"
ENV ANDROID_NDK_VERSION "21.3.6528147"

# Set up the language variables to avoid problems (we run locale-gen later).
ENV LANG en_US.UTF-8
Expand Down

0 comments on commit dee4e7a

Please sign in to comment.