Merge changes from topic "libcxx-debug"

* changes:
  Mention libc++ not being stripped in the changelog.
  Add APP_STRIP_MODE and LOCAL_STRIP_MODE.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c272b83..09a7ce2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -87,6 +87,12 @@
    to not call `dlclose`.
  * [Issue 70838247]: Gold emits broken debug information for AArch64. AArch64
    still uses BFD by default.
+ * 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 360]: https://github.com/android-ndk/ndk/issues/360
 [Issue 70838247]: https://issuetracker.google.com/70838247
+[use plugin version 3.1 or newer]: https://developer.android.com/studio/releases/gradle-plugin#updating-plugin
diff --git a/docs/PlatformApis.md b/docs/PlatformApis.md
index 5fb87ee..9629c43 100644
--- a/docs/PlatformApis.md
+++ b/docs/PlatformApis.md
@@ -123,9 +123,12 @@
 You wouldn't be adding a library to the NDK unless you actually wanted apps to
 be able to use your library, but in Android N or later, apps are only allowed
 to access libraries on a specific whitelist of NDK libraries. This list is
-stored in `system/core/rootdir/etc/public.libraries.android.txt` with another
-subset in `system/core/rootdir/etc/public.libraries.wear.txt` for Android Wear
-devices.
+stored in:
+- `system/core/rootdir/etc/public.libraries.android.txt` for main Android
+- `system/core/rootdir/etc/public.libraries.wear.txt` for Android Wear
+devices
+- `system/core/rootdir/etc/public.libraries.iot.txt` for Android Things devices
+
 
 ### CTS
 
diff --git a/docs/Roadmap.md b/docs/Roadmap.md
index 73ecbed..d721a9a 100644
--- a/docs/Roadmap.md
+++ b/docs/Roadmap.md
@@ -172,6 +172,23 @@
 We should send patches to the CMake implementation that will load as much
 information about the NDK as possible from tables we provide in the NDK.
 
+### Weak symbols for API additions
+
+iOS developers are used to using weak symbols to refer to function that
+may be present in their equivalent of `targetSdkVersion` but not in their
+`minSdkVersion`. They use a run-time null check to decide whether the
+new function is available or not. Apparently clang also has some support
+for emitting a warning if you dereference one of these symbols without
+a corresponding null check.
+
+This seems like a more convenient option than is currently available
+on Android, especially since no currently shipping version of Android
+includes a function to check which version of Android you're running on.
+
+We might not want to make this the default (because it's such a break
+with historical practice, and might be surprising), but we should offer
+this as an option.
+
 ---
 
 ## Historical releases
diff --git a/ndk-which b/ndk-which
index ce83970..67aec48 100755
--- a/ndk-which
+++ b/ndk-which
@@ -15,18 +15,48 @@
 # limitations under the License.
 #
 
-# This script is useful for learning the path of the active toolchain
-# components within the ndk.
-# Run this script without parameters, for usage hints.
+#
+# DEPRECATED
+#
 
-# show usage if no parameter given
-WHICH=$1
-if [ "$WHICH" == "" ]; then
-  echo "USAGE: ndk-which <tool>"
-  echo "where tool is 'gdb', 'gcc', 'objdump', etc."
+# This script shows the path of the active toolchain components within
+# the ndk. This was necessary for GCC and binutils, where each ABI had
+# its own tools, but is not needed for LLVM-based tools which should be
+# used in preference.
+
+usage() {
+  echo "USAGE: ndk-which [--abi ABI] TOOL"
+  echo "ABI is 'armeabi-v7a', 'arm64-v8a', 'x86', or 'x86_64'"
+  echo "TOOL is 'gdb', 'objdump', 'readelf', etc."
+  echo
+  echo "Note that LLVM replacements for binutils tools work for all ABIs."
   exit 1
+}
+
+ABI=armeabi-v7a
+
+while (( "$#" )); do
+  case "$1" in
+    --abi)
+      ABI=$2
+      shift 2
+      abis="armeabi-v7a|arm64-v8a|x86|x86_64"
+      if [[ ! "$ABI" =~ $abis ]]; then usage; fi
+      ;;
+    *)
+      break
+      ;;
+  esac
+done
+
+TOOL=$1
+shift
+
+if [ "$#" != 0 -o "$TOOL" == "" ]; then
+  usage
 fi
 
+# This tool is installed in prebuilt/linux-x86_64/bin/.
 MYNDKDIR=`dirname $0`/../../..
 
 # create a temporary skeleton project so that we can leverage build-local.mk
@@ -36,21 +66,18 @@
 include $(CLEAR_VARS)
 END_OF_FILE
 
-# 'get_build_var_for_abi' was copied from ndk-gdb
-get_build_var_for_abi ()
-{
-    if [ -z "$GNUMAKE" ] ; then
-        GNUMAKE=make
-    fi
-    NDK_PROJECT_PATH=$TMPDIR $GNUMAKE --no-print-dir -f $MYNDKDIR/build/core/build-local.mk DUMP_$1 APP_ABI=$2
+get_build_var_for_abi() {
+  if [ -z "$GNUMAKE" ] ; then
+    GNUMAKE=make
+  fi
+  NDK_PROJECT_PATH=$TMPDIR $GNUMAKE --no-print-dir -f $MYNDKDIR/build/core/build-local.mk DUMP_$1 APP_ABI=$2
 }
 
-TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX armeabi`
+TOOLCHAIN_PREFIX=`get_build_var_for_abi TOOLCHAIN_PREFIX $ABI`
 rm -Rf $TMPDIR
 
 # fully qualified file name
-FQFN=${TOOLCHAIN_PREFIX}$WHICH
+FQFN=${TOOLCHAIN_PREFIX}$TOOL
 
 # use the host system's 'which' to decide/report if the file exists or not, and is executable
 which "$FQFN"
-