Upgrade to Linux NDK to 23.1.7779620
Downloaded from:
https://dl.google.com/android/repository/android-ndk-r23b-linux.zip
Test: ./gradlew bOS
Change-Id: I14e738be2b723e6f3c31672badc70b78e5170504
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 42e73b3..7df6a5a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,16 +11,72 @@
* 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.
+ 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. The GDB from r22 will continue to be included in
- the NDK, but it will be removed if and when it stops working. Use LLDB
+* 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).
+
+[Clang Migration Notes]: ClangMigration.md
+
+## r23b
+
+* Update LLVM to clang-r416183c1, based on LLVM 12 development.
+ * [Issue 1540]: Fixed compiler crash when using coroutines.
+ * [Issue 1544]: Now uses universal binaries for M1 Macs.
+ * [Issue 1551]: Prevent each translation unit from receiving its own copy of
+ emulated thread-local global variables.
+ * [Issue 1555]: Fixed compiler crash for armeabi-v7a.
+* [Issue 1492]: ndk-build.cmd: Stop using make's `-O` (`--output-sync`) flag on
+ Windows to avoid `fcntl(): Bad file descriptor` error.
+* [Issue 1553]: Updated sysroot to latest Android 12.
+* [Issue 1569]: Fixed `-fno-integrated-as` not being able to find the assembler.
+* CMake changes:
+ * [Issue 1536]: Make optimization flags used with CMake more consistent.
+ Historically thumb release builds used `-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.
+ * [Issue 1560]: Fixed pull-up of unsupported API levels when using the new
+ CMake toolchain file. This affects CMake 3.21 and
+ `ANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON` use cases, and was the common case
+ for AGP users with a `minSdkVersion` below 21.
+ * [Issue 1573]: Fixed `ANDROID_USE_LEGACY_TOOLCHAIN_FILE` not being obeyed
+ during CMake try-compile.
+ * [Issue 1581]: Added workaround for [CMake Issue 22647], which was causing
+ `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.
+
+[CMake Issue 22647]: https://gitlab.kitware.com/cmake/cmake/-/issues/22647
+[Issue 1492]: https://github.com/android/ndk/issues/1492
+[Issue 1536]: https://github.com/android/ndk/issues/1536
+[Issue 1540]: https://github.com/android/ndk/issues/1540
+[Issue 1544]: https://github.com/android/ndk/issues/1544
+[Issue 1551]: https://github.com/android/ndk/issues/1551
+[Issue 1553]: https://github.com/android/ndk/issues/1553
+[Issue 1555]: https://github.com/android/ndk/issues/1555
+[Issue 1560]: https://github.com/android/ndk/issues/1560
+[Issue 1569]: https://github.com/android/ndk/issues/1569
+[Issue 1573]: https://github.com/android/ndk/issues/1573
+[Issue 1581]: https://github.com/android/ndk/issues/1581
+
## Changes
-* Includes preview Android S DP 1 APIs.
-* Updated LLVM to clang-r416183, based on LLVM 12 development.
+* Includes Android 12 APIs.
+* Updated LLVM to clang-r416183b, based on LLVM 12 development.
* [Issue 1047]: Fixes crash when using ASan with the CFI unwinder.
* [Issue 1096]: Includes support for [Polly]. Enable by adding `-mllvm -polly`
to your cflags.
@@ -32,11 +88,18 @@
The latest are now posted directly to [GitHub](https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases).
* Vulkan tools source is also removed, specifically vulkan_wrapper.
It should be downloaded upstream from [GitHub](https://github.com/KhronosGroup/Vulkan-Tools).
-* The toolchain file (android.toolchain.cmake) is refactored to base on cmake's
+* The toolchain file (android.toolchain.cmake) is refactored to base on CMake's
integrated Android support. This new toolchain file will be enabled by default
- for cmake 3.20 and newer. No user side change is expected. But if anything goes
+ for CMake 3.21 and newer. No user side change is expected. But if anything goes
wrong, please file a bug and set `ANDROID_USE_LEGACY_TOOLCHAIN_FILE=ON` to
restore the legacy behavior.
+ * When using the new behavior (when using CMake 3.21+ and not explicitly
+ selecting the legacy toolchain), **default build flags may change**. One
+ of the primary goals was to reduce the behavior differences between our
+ toolchain and CMake, and CMake's default flags do not always match the
+ legacy toolchain file. Most notably, if using `CMAKE_BUILD_TYPE=Release`,
+ your optimization type will likely be `-O3` instead of `-O2` or `-Oz`. See
+ [Issue 1536] for more information.
* [Issue 929]: `find_library` now prefers shared libraries from the sysroot over
static libraries.
* [Issue 1390]: ndk-build now warns when building a static executable with the
@@ -54,6 +117,7 @@
[Issue 1390]: https://github.com/android/ndk/issues/1390
[Issue 1406]: https://github.com/android/ndk/issues/1406
[Issue 1452]: https://github.com/android/ndk/issues/1452
+[Issue 1536]: https://github.com/android/ndk/issues/1536
[Polly]: https://polly.llvm.org/
## Known Issues
@@ -94,22 +158,7 @@
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.
-* [Issue 1130]: When using `c++_static` and the deprecated linker with ndk-build
- with an `APP_PLATFORM` below 21, undefined references to operator new may
- occur. The fix is to use LLD.
-* This version of the NDK is incompatible with the Android Gradle plugin
- version 3.0 or older. If you see an error like
- `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`,
- update your project file to [use plugin version 3.1 or newer]. You will also
- need to upgrade to Android Studio 3.1 or newer.
-* [Issue 843]: Using LLD with binutils `strip` or `objcopy` breaks RelRO. Use
- `llvm-strip` and `llvm-objcopy` instead. This issue has been resolved in
- Android Gradle Plugin version 4.0 (for non-Gradle users, the fix is also in
- ndk-build and our CMake toolchain file), but may affect other build systems.
[Issue 360]: https://github.com/android/ndk/issues/360
-[Issue 843]: https://github.com/android/ndk/issues/843
[Issue 906]: https://github.com/android/ndk/issues/906
[Issue 988]: https://github.com/android/ndk/issues/988
-[Issue 1130]: https://github.com/android/ndk/issues/1130
-[use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin