Report issues to GitHub.
For Android Studio issues, follow the docs on the Android Studio site.
GNU binutils, excluding the GNU Assembler (GAS), has been removed. GAS will be removed in the next release. If you are building with -fno-integrated-as
, file bugs if anything is preventing you from removing that flag. See Clang Migration Notes for advice about making assembly compatible with LLVM.
Support for GDB has ended. GDB will be removed in the next release. Use LLDB instead. Note that ndk-gdb
uses LLDB by default.
NDK r23 is the last release that will support non-Neon. Beginning with NDK r24, the armeabi-v7a libraries in the sysroot will be built with Neon. A very small number of very old devices do not support Neon so most apps will not notice aside from the performance improvement.
Jelly Bean (APIs 16, 17, and 18) will not be supported in the next NDK release. The minimum OS supported by the NDK for r24 will be KitKat (API level 19).
-O
(--output-sync
) flag on Windows to avoid fcntl(): Bad file descriptor
error.-fno-integrated-as
not being able to find the assembler.-Oz
, but AGP switched to using RelWithDebInfo
for release builds in the latest release which was not using -Oz
. To reduce per-arch differences and behavior differences compared to CMake's defaults, -Oz
use was removed. You may see code size increases for armeabi-v7a due to this, but also increased optimization. To restore the prior behavior, add -Oz
to your cflags.ANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON
use cases, and was the common case for AGP users with a minSdkVersion
below 21.ANDROID_USE_LEGACY_TOOLCHAIN_FILE
not being obeyed during CMake try-compile.MINGW
to be incorrectly defined by CMake when building for Android on a Windows host. This only affected those using the Android toolchain file when CMake 3.21 or newer was used. This likely was not a regression for users not using the Android toolchain. The change will fix both use cases.-mllvm -polly
to your cflags.ANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON
to restore the legacy behavior.CMAKE_BUILD_TYPE=Release
, your optimization type will likely be -O3
instead of -O2
or -Oz
. See Issue 1536 for more information.find_library
now prefers shared libraries from the sysroot over static libraries.NDK_ANALYZE=1
now sets APP_CLANG_TIDY=true
rather than using scan-build. clang-tidy performs all the same checks by default, and scan-build was no longer working. See the bug for more details, but no user-side changes should be needed.This is not intended to be a comprehensive list of all outstanding bugs.
Issue 360: thread_local
variables with non-trivial destructors will cause segfaults if the containing library is dlclose
ed on devices running M or newer, or devices before M when using a static STL. The simple workaround is to not call dlclose
.
Issue 906: Clang does not pass -march=armv7-a
to the assembler when using -fno-integrated-as
. This results in the assembler generating ARMv5 instructions. Note that by default Clang uses the integrated assembler which does not have this problem. To workaround this issue, explicitly use -march=armv7-a
when building for 32-bit ARM with the non-integrated assembler, or use the integrated assembler. ndk-build and CMake already contain these workarounds.
Issue 988: Exception handling when using ASan via wrap.sh can crash. To workaround this issue when using libc++_shared, ensure that your application's libc++_shared.so is in LD_PRELOAD
in your wrap.sh
as in the following example:
#!/system/bin/sh HERE="$(cd "$(dirname "$0")" && pwd)" export ASAN_OPTIONS=log_to_syslog=false,allow_user_segv_handler=1 ASAN_LIB=$(ls $HERE/libclang_rt.asan-*-android.so) if [ -f "$HERE/libc++_shared.so" ]; then # Workaround for https://github.com/android/ndk/issues/988. export LD_PRELOAD="$ASAN_LIB $HERE/libc++_shared.so" else export LD_PRELOAD="$ASAN_LIB" fi "$@"
There is no known workaround for libc++_static.
Note that because this is a platform bug rather than an NDK bug this workaround will be necessary for this use case to work on all devices until at least Android R.