android / android/ndk

[BUG] The legacy toolchain file incorrectly sets `CMAKE_ANDROID_ARM_MODE`

Open
#2,222 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
2.3k
Forks
310
PR merge metrics
No merged PRs in 30d

Description

### Description

`CMAKE_ANDROID_ARM_MODE` should be `ON`/`OFF` per [its doc](https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARM_MODE.html), but the legacy toolchain file will set it to `ANDROID_ARM_MODE`, which is `thumb`/`arm`, so `CMAKE_ANDROID_ARM_MODE` will always be evaluated as `ON`.
I'm surprised it's broken since the beginning: https://android-review.googlesource.com/c/platform/ndk/+/360029

### I am using a supported NDK

- [x] I have checked and the NDK I'm using is currently supported

### Affected versions

r27, r28, r29

Contributor guide

Open the contributing guide

Research direction

Locate the legacy toolchain file and trace how CMAKE_ANDROID_ARM_MODE is assigned from ANDROID_ARM_MODE. Compare the resulting value with the CMake variable documentation, then verify that the affected NDK versions produce the intended ON/OFF value.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cmake
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.