Merge "Update ART Module prebuilts to build 7154036." am: 19521522fd

Original change: https://android-review.googlesource.com/c/platform/prebuilts/module_sdk/art/+/1594233

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7509b73fecb01cf46a881e5cfd50bc85504560ab
diff --git a/current/host-exports/x86_64/bin/dex2oat64 b/current/host-exports/x86_64/bin/dex2oat64
index 0ae39a3..aaddcbc 100755
--- a/current/host-exports/x86_64/bin/dex2oat64
+++ b/current/host-exports/x86_64/bin/dex2oat64
Binary files differ
diff --git a/current/host-exports/x86_64/bin/dex2oatd64 b/current/host-exports/x86_64/bin/dex2oatd64
index dee0fa0..ecba55d 100755
--- a/current/host-exports/x86_64/bin/dex2oatd64
+++ b/current/host-exports/x86_64/bin/dex2oatd64
Binary files differ
diff --git a/current/host-exports/x86_64/bin/hiddenapi b/current/host-exports/x86_64/bin/hiddenapi
index 87baecc..bf7f13d 100755
--- a/current/host-exports/x86_64/bin/hiddenapi
+++ b/current/host-exports/x86_64/bin/hiddenapi
Binary files differ
diff --git a/current/sdk/android/arm/lib/libandroidio.so b/current/sdk/android/arm/lib/libandroidio.so
index a45ab23..752fd72 100755
--- a/current/sdk/android/arm/lib/libandroidio.so
+++ b/current/sdk/android/arm/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libdexfile_external.so b/current/sdk/android/arm/lib/libdexfile_external.so
index 22e2f1a..6ad0694 100755
--- a/current/sdk/android/arm/lib/libdexfile_external.so
+++ b/current/sdk/android/arm/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libdexfile_external_static.a b/current/sdk/android/arm/lib/libdexfile_external_static.a
index 0a8daa8..3101e3e 100644
--- a/current/sdk/android/arm/lib/libdexfile_external_static.a
+++ b/current/sdk/android/arm/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/android/arm/lib/libdexfile_support.a b/current/sdk/android/arm/lib/libdexfile_support.a
index dd4a022..e74a353 100644
--- a/current/sdk/android/arm/lib/libdexfile_support.a
+++ b/current/sdk/android/arm/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/android/arm/lib/libdexfile_support.so b/current/sdk/android/arm/lib/libdexfile_support.so
index 668ab55..892c1bb 100755
--- a/current/sdk/android/arm/lib/libdexfile_support.so
+++ b/current/sdk/android/arm/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libnativebridge.so b/current/sdk/android/arm/lib/libnativebridge.so
index 0de20d1..cad8769 100755
--- a/current/sdk/android/arm/lib/libnativebridge.so
+++ b/current/sdk/android/arm/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libnativehelper.so b/current/sdk/android/arm/lib/libnativehelper.so
index 7b5b46c..b0d7a7f 100755
--- a/current/sdk/android/arm/lib/libnativehelper.so
+++ b/current/sdk/android/arm/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libnativehelper_lazy.a b/current/sdk/android/arm/lib/libnativehelper_lazy.a
index a22ccf9..9e7eb7b 100644
--- a/current/sdk/android/arm/lib/libnativehelper_lazy.a
+++ b/current/sdk/android/arm/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/android/arm/lib/libnativeloader.so b/current/sdk/android/arm/lib/libnativeloader.so
index 680a4e7..54f07d7 100755
--- a/current/sdk/android/arm/lib/libnativeloader.so
+++ b/current/sdk/android/arm/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/android/arm/lib/libsigchain.a b/current/sdk/android/arm/lib/libsigchain.a
index 9d83553..7bc892c 100644
--- a/current/sdk/android/arm/lib/libsigchain.a
+++ b/current/sdk/android/arm/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/android/arm/lib/libsigchain.so b/current/sdk/android/arm/lib/libsigchain.so
index f026a76..8a16e15 100755
--- a/current/sdk/android/arm/lib/libsigchain.so
+++ b/current/sdk/android/arm/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libandroidio.so b/current/sdk/android/arm64/lib/libandroidio.so
index 1a29154..886bb08 100755
--- a/current/sdk/android/arm64/lib/libandroidio.so
+++ b/current/sdk/android/arm64/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libdexfile_external.so b/current/sdk/android/arm64/lib/libdexfile_external.so
index 2f0e115..6d88e3d 100755
--- a/current/sdk/android/arm64/lib/libdexfile_external.so
+++ b/current/sdk/android/arm64/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libdexfile_external_static.a b/current/sdk/android/arm64/lib/libdexfile_external_static.a
index 0835222..c3451bb 100644
--- a/current/sdk/android/arm64/lib/libdexfile_external_static.a
+++ b/current/sdk/android/arm64/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libdexfile_support.a b/current/sdk/android/arm64/lib/libdexfile_support.a
index 504233f..1dad37e 100644
--- a/current/sdk/android/arm64/lib/libdexfile_support.a
+++ b/current/sdk/android/arm64/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libdexfile_support.so b/current/sdk/android/arm64/lib/libdexfile_support.so
index 2b1bc60..8bfc0ef 100755
--- a/current/sdk/android/arm64/lib/libdexfile_support.so
+++ b/current/sdk/android/arm64/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libnativebridge.so b/current/sdk/android/arm64/lib/libnativebridge.so
index 7e7aef1..0dfa157 100755
--- a/current/sdk/android/arm64/lib/libnativebridge.so
+++ b/current/sdk/android/arm64/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libnativehelper.so b/current/sdk/android/arm64/lib/libnativehelper.so
index e2824a3..18f1532 100755
--- a/current/sdk/android/arm64/lib/libnativehelper.so
+++ b/current/sdk/android/arm64/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libnativehelper_lazy.a b/current/sdk/android/arm64/lib/libnativehelper_lazy.a
index 6ee81ed..98f517c 100644
--- a/current/sdk/android/arm64/lib/libnativehelper_lazy.a
+++ b/current/sdk/android/arm64/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libnativeloader.so b/current/sdk/android/arm64/lib/libnativeloader.so
index 447ef08..11dcb69 100755
--- a/current/sdk/android/arm64/lib/libnativeloader.so
+++ b/current/sdk/android/arm64/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libsigchain.a b/current/sdk/android/arm64/lib/libsigchain.a
index 25cd89b..b2fb10b 100644
--- a/current/sdk/android/arm64/lib/libsigchain.a
+++ b/current/sdk/android/arm64/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/android/arm64/lib/libsigchain.so b/current/sdk/android/arm64/lib/libsigchain.so
index 9f794d7..a1be4d2 100755
--- a/current/sdk/android/arm64/lib/libsigchain.so
+++ b/current/sdk/android/arm64/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/legacy_signal_inlines.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/legacy_signal_inlines.h
index a673446..95c2320 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/legacy_signal_inlines.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/legacy_signal_inlines.h
@@ -45,14 +45,32 @@
 int __libc_current_sigrtmin() __attribute__((__weak__)) __VERSIONER_NO_GUARD;
 
 static __inline int __ndk_legacy___libc_current_sigrtmax() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmax) {
+#endif
     return __libc_current_sigrtmax();
   }
   return __SIGRTMAX; /* Should match __libc_current_sigrtmax. */
 }
 
 static __inline int __ndk_legacy___libc_current_sigrtmin() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmin) {
+#endif
     return __libc_current_sigrtmin();
   }
   return __SIGRTMIN + 7; /* Should match __libc_current_sigrtmin. */
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/versioning.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/versioning.h
index 2b9a027..214acf2 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/versioning.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/android/versioning.h
@@ -21,12 +21,14 @@
 #if defined(__BIONIC_VERSIONER)
 
 #define __INTRODUCED_IN(api_level) __attribute__((annotate("introduced_in=" #api_level)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in=" #api_level))) __VERSIONER_NO_GUARD
 #define __DEPRECATED_IN(api_level) __attribute__((annotate("deprecated_in=" #api_level)))
 #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
 #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
 #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
 #define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
 #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in_x86=" #api_level))) __VERSIONER_NO_GUARD
 
 #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
 #define __VERSIONER_FORTIFY_INLINE __attribute__((annotate("versioner_fortify_inline")))
@@ -42,18 +44,24 @@
 // be enforced. In the case, the absence of 'strict' makes it possible to call an unavailable API
 // without the __builtin_available check, which will cause a link error at runtime.
 // Android platform build system defines this macro along with -Wunguarded-availability
-#if defined(__ANDROID_UNGUARDED_AVAILABILITY__)
-#define __MAYBE_STRICT
+//
+// The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+// allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+// libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+// those APIs will still cause a link error.
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
 #else
-#define __MAYBE_STRICT ,strict
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level)
 #endif
 
-#define __INTRODUCED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
-#define __DEPRECATED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,deprecated=api_level)))
-#define __REMOVED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,obsoleted=api_level)))
+#define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
+#define __DEPRECATED_IN(api_level) __BIONIC_AVAILABILITY(deprecated=api_level)
+#define __REMOVED_IN(api_level) __BIONIC_AVAILABILITY(obsoleted=api_level)
 
 // The same availability attribute can't be annotated multiple times. Therefore, the macros are
 // defined for the configuration that it is valid for so that declarations like the below doesn't
@@ -68,23 +76,19 @@
 //
 // hasn't been supported and won't be.
 #if !defined(__LP64__)
-#define __INTRODUCED_IN_32(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_64(api_level)
 #else
 #define __INTRODUCED_IN_32(api_level)
-#define __INTRODUCED_IN_64(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #endif
 
 #if defined(__arm__) || defined(__aarch64__)
-#define __INTRODUCED_IN_ARM(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_ARM(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_X86(api_level)
 #elif defined(__i386__) || defined(__x86_64__)
 #define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_X86(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #else
 #define __INTRODUCED_IN_ARM(api_level)
 #define __INTRODUCED_IN_X86(api_level)
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/bits/wctype.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/bits/wctype.h
index a51eca2..0015261 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/bits/wctype.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/bits/wctype.h
@@ -58,8 +58,8 @@
 int iswctype(wint_t __wc, wctype_t __type);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
-wctrans_t wctrans(const char* __name) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wctrans_t wctrans(const char* __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 
 __END_DECLS
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/locale.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/locale.h
index 4290992..8785b24 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/locale.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/locale.h
@@ -96,7 +96,7 @@
   char int_n_sign_posn;
 };
 
-struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+struct lconv* localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
 void freelocale(locale_t __l) __INTRODUCED_IN(21);
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/malloc.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/malloc.h
index 598a50b..bae1f68 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/malloc.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/malloc.h
@@ -204,18 +204,19 @@
 #define M_TSDS_COUNT_MAX (-202)
 
 /**
- * mallopt() option to disable heap initialization across the whole process.
- * If the hardware supports memory tagging, this also disables memory tagging.
- * May be called at any time, including when multiple threads are running. The
- * value is unused but must be set to 0.
+ * mallopt() option to decide whether heap memory is zero-initialized on
+ * allocation across the whole process. May be called at any time, including
+ * when multiple threads are running. An argument of zero indicates memory
+ * should not be zero-initialized, any other value indicates to initialize heap
+ * memory to zero.
  *
- * Note that these memory mitigations are only implemented in scudo and
- * therefore this will have no effect when using another allocator (such as
- * jemalloc on Android Go devices).
+ * Note that this memory mitigations is only implemented in scudo and therefore
+ * this will have no effect when using another allocator (such as jemalloc on
+ * Android Go devices).
  *
  * Available since API level 31.
  */
-#define M_BIONIC_DISABLE_MEMORY_MITIGATIONS (-203)
+#define M_BIONIC_ZERO_INIT (-203)
 
 /**
  * mallopt() option to change the heap tagging state. May be called at any
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/math.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/math.h
index 8c084b2..040dc96 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/math.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/math.h
@@ -178,9 +178,9 @@
 long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
 
 /* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
+double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
 
 double cbrt(double __x);
 float cbrtf(float __x);
@@ -280,11 +280,11 @@
 
 double nextafter(double __x, double __y);
 float nextafterf(float __x, float __y);
-long double nextafterl(long double __x, long double __y) __RENAME_LDBL(nextafter, 3, 21) __VERSIONER_NO_GUARD;
+long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
+double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
 float nexttowardf(float __x, long double __y);
-long double nexttowardl(long double __x, long double __y) __RENAME_LDBL(nexttoward, 18, 18) __VERSIONER_NO_GUARD;
+long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);
 
 double fdim(double __x, double __y);
 float fdimf(float __x, float __y);
@@ -300,7 +300,7 @@
 
 double fma(double __x, double __y, double __z);
 float fmaf(float __x, float __y, float __z);
-long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL(fma, 3, 21) __VERSIONER_NO_GUARD;
+long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL_NO_GUARD_FOR_NDK(fma, 3, 21);
 
 #define isgreater(x, y) __builtin_isgreater((x), (y))
 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/stdlib.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/stdlib.h
index dc7b694..d7fdb4a 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/stdlib.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/stdlib.h
@@ -160,10 +160,10 @@
 const char* getprogname(void) __INTRODUCED_IN(21);
 void setprogname(const char* __name) __INTRODUCED_IN(21);
 
-int mblen(const char* __s, size_t __n) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+int mblen(const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n);
-int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
-int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/sys/cdefs.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/sys/cdefs.h
index b4556a7..b1bd713 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/sys/cdefs.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm/include/bionic/libc/include/sys/cdefs.h
@@ -202,11 +202,18 @@
  * Note that some functions have their __RENAME_LDBL commented out as a sign that although we could
  * use __RENAME_LDBL it would actually cause the function to be introduced later because the
  * `long double` variant appeared before the `double` variant.
+ *
+ * The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+ * allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+ * libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+ * those APIs will still cause a link error.
  */
 #if defined(__LP64__) || defined(__BIONIC_LP32_USE_LONG_DOUBLE)
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN_NO_GUARD_FOR_NDK(regular_api_level)
 #else
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN_NO_GUARD_FOR_NDK(rewrite_api_level)
 #endif
 
 /*
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/legacy_signal_inlines.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/legacy_signal_inlines.h
index a673446..95c2320 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/legacy_signal_inlines.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/legacy_signal_inlines.h
@@ -45,14 +45,32 @@
 int __libc_current_sigrtmin() __attribute__((__weak__)) __VERSIONER_NO_GUARD;
 
 static __inline int __ndk_legacy___libc_current_sigrtmax() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmax) {
+#endif
     return __libc_current_sigrtmax();
   }
   return __SIGRTMAX; /* Should match __libc_current_sigrtmax. */
 }
 
 static __inline int __ndk_legacy___libc_current_sigrtmin() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmin) {
+#endif
     return __libc_current_sigrtmin();
   }
   return __SIGRTMIN + 7; /* Should match __libc_current_sigrtmin. */
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/versioning.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/versioning.h
index 2b9a027..214acf2 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/versioning.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/android/versioning.h
@@ -21,12 +21,14 @@
 #if defined(__BIONIC_VERSIONER)
 
 #define __INTRODUCED_IN(api_level) __attribute__((annotate("introduced_in=" #api_level)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in=" #api_level))) __VERSIONER_NO_GUARD
 #define __DEPRECATED_IN(api_level) __attribute__((annotate("deprecated_in=" #api_level)))
 #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
 #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
 #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
 #define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
 #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in_x86=" #api_level))) __VERSIONER_NO_GUARD
 
 #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
 #define __VERSIONER_FORTIFY_INLINE __attribute__((annotate("versioner_fortify_inline")))
@@ -42,18 +44,24 @@
 // be enforced. In the case, the absence of 'strict' makes it possible to call an unavailable API
 // without the __builtin_available check, which will cause a link error at runtime.
 // Android platform build system defines this macro along with -Wunguarded-availability
-#if defined(__ANDROID_UNGUARDED_AVAILABILITY__)
-#define __MAYBE_STRICT
+//
+// The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+// allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+// libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+// those APIs will still cause a link error.
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
 #else
-#define __MAYBE_STRICT ,strict
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level)
 #endif
 
-#define __INTRODUCED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
-#define __DEPRECATED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,deprecated=api_level)))
-#define __REMOVED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,obsoleted=api_level)))
+#define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
+#define __DEPRECATED_IN(api_level) __BIONIC_AVAILABILITY(deprecated=api_level)
+#define __REMOVED_IN(api_level) __BIONIC_AVAILABILITY(obsoleted=api_level)
 
 // The same availability attribute can't be annotated multiple times. Therefore, the macros are
 // defined for the configuration that it is valid for so that declarations like the below doesn't
@@ -68,23 +76,19 @@
 //
 // hasn't been supported and won't be.
 #if !defined(__LP64__)
-#define __INTRODUCED_IN_32(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_64(api_level)
 #else
 #define __INTRODUCED_IN_32(api_level)
-#define __INTRODUCED_IN_64(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #endif
 
 #if defined(__arm__) || defined(__aarch64__)
-#define __INTRODUCED_IN_ARM(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_ARM(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_X86(api_level)
 #elif defined(__i386__) || defined(__x86_64__)
 #define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_X86(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #else
 #define __INTRODUCED_IN_ARM(api_level)
 #define __INTRODUCED_IN_X86(api_level)
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/bits/wctype.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/bits/wctype.h
index a51eca2..0015261 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/bits/wctype.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/bits/wctype.h
@@ -58,8 +58,8 @@
 int iswctype(wint_t __wc, wctype_t __type);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
-wctrans_t wctrans(const char* __name) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wctrans_t wctrans(const char* __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 
 __END_DECLS
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/locale.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/locale.h
index 4290992..8785b24 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/locale.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/locale.h
@@ -96,7 +96,7 @@
   char int_n_sign_posn;
 };
 
-struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+struct lconv* localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
 void freelocale(locale_t __l) __INTRODUCED_IN(21);
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/malloc.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/malloc.h
index 598a50b..bae1f68 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/malloc.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/malloc.h
@@ -204,18 +204,19 @@
 #define M_TSDS_COUNT_MAX (-202)
 
 /**
- * mallopt() option to disable heap initialization across the whole process.
- * If the hardware supports memory tagging, this also disables memory tagging.
- * May be called at any time, including when multiple threads are running. The
- * value is unused but must be set to 0.
+ * mallopt() option to decide whether heap memory is zero-initialized on
+ * allocation across the whole process. May be called at any time, including
+ * when multiple threads are running. An argument of zero indicates memory
+ * should not be zero-initialized, any other value indicates to initialize heap
+ * memory to zero.
  *
- * Note that these memory mitigations are only implemented in scudo and
- * therefore this will have no effect when using another allocator (such as
- * jemalloc on Android Go devices).
+ * Note that this memory mitigations is only implemented in scudo and therefore
+ * this will have no effect when using another allocator (such as jemalloc on
+ * Android Go devices).
  *
  * Available since API level 31.
  */
-#define M_BIONIC_DISABLE_MEMORY_MITIGATIONS (-203)
+#define M_BIONIC_ZERO_INIT (-203)
 
 /**
  * mallopt() option to change the heap tagging state. May be called at any
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/math.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/math.h
index 8c084b2..040dc96 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/math.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/math.h
@@ -178,9 +178,9 @@
 long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
 
 /* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
+double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
 
 double cbrt(double __x);
 float cbrtf(float __x);
@@ -280,11 +280,11 @@
 
 double nextafter(double __x, double __y);
 float nextafterf(float __x, float __y);
-long double nextafterl(long double __x, long double __y) __RENAME_LDBL(nextafter, 3, 21) __VERSIONER_NO_GUARD;
+long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
+double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
 float nexttowardf(float __x, long double __y);
-long double nexttowardl(long double __x, long double __y) __RENAME_LDBL(nexttoward, 18, 18) __VERSIONER_NO_GUARD;
+long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);
 
 double fdim(double __x, double __y);
 float fdimf(float __x, float __y);
@@ -300,7 +300,7 @@
 
 double fma(double __x, double __y, double __z);
 float fmaf(float __x, float __y, float __z);
-long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL(fma, 3, 21) __VERSIONER_NO_GUARD;
+long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL_NO_GUARD_FOR_NDK(fma, 3, 21);
 
 #define isgreater(x, y) __builtin_isgreater((x), (y))
 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/stdlib.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/stdlib.h
index dc7b694..d7fdb4a 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/stdlib.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/stdlib.h
@@ -160,10 +160,10 @@
 const char* getprogname(void) __INTRODUCED_IN(21);
 void setprogname(const char* __name) __INTRODUCED_IN(21);
 
-int mblen(const char* __s, size_t __n) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+int mblen(const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n);
-int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
-int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/sys/cdefs.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/sys/cdefs.h
index b4556a7..b1bd713 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/sys/cdefs.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/arm64/include/bionic/libc/include/sys/cdefs.h
@@ -202,11 +202,18 @@
  * Note that some functions have their __RENAME_LDBL commented out as a sign that although we could
  * use __RENAME_LDBL it would actually cause the function to be introduced later because the
  * `long double` variant appeared before the `double` variant.
+ *
+ * The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+ * allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+ * libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+ * those APIs will still cause a link error.
  */
 #if defined(__LP64__) || defined(__BIONIC_LP32_USE_LONG_DOUBLE)
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN_NO_GUARD_FOR_NDK(regular_api_level)
 #else
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN_NO_GUARD_FOR_NDK(rewrite_api_level)
 #endif
 
 /*
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/legacy_signal_inlines.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/legacy_signal_inlines.h
index a673446..95c2320 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/legacy_signal_inlines.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/legacy_signal_inlines.h
@@ -45,14 +45,32 @@
 int __libc_current_sigrtmin() __attribute__((__weak__)) __VERSIONER_NO_GUARD;
 
 static __inline int __ndk_legacy___libc_current_sigrtmax() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmax) {
+#endif
     return __libc_current_sigrtmax();
   }
   return __SIGRTMAX; /* Should match __libc_current_sigrtmax. */
 }
 
 static __inline int __ndk_legacy___libc_current_sigrtmin() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmin) {
+#endif
     return __libc_current_sigrtmin();
   }
   return __SIGRTMIN + 7; /* Should match __libc_current_sigrtmin. */
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/versioning.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/versioning.h
index 2b9a027..214acf2 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/versioning.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/android/versioning.h
@@ -21,12 +21,14 @@
 #if defined(__BIONIC_VERSIONER)
 
 #define __INTRODUCED_IN(api_level) __attribute__((annotate("introduced_in=" #api_level)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in=" #api_level))) __VERSIONER_NO_GUARD
 #define __DEPRECATED_IN(api_level) __attribute__((annotate("deprecated_in=" #api_level)))
 #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
 #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
 #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
 #define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
 #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in_x86=" #api_level))) __VERSIONER_NO_GUARD
 
 #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
 #define __VERSIONER_FORTIFY_INLINE __attribute__((annotate("versioner_fortify_inline")))
@@ -42,18 +44,24 @@
 // be enforced. In the case, the absence of 'strict' makes it possible to call an unavailable API
 // without the __builtin_available check, which will cause a link error at runtime.
 // Android platform build system defines this macro along with -Wunguarded-availability
-#if defined(__ANDROID_UNGUARDED_AVAILABILITY__)
-#define __MAYBE_STRICT
+//
+// The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+// allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+// libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+// those APIs will still cause a link error.
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
 #else
-#define __MAYBE_STRICT ,strict
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level)
 #endif
 
-#define __INTRODUCED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
-#define __DEPRECATED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,deprecated=api_level)))
-#define __REMOVED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,obsoleted=api_level)))
+#define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
+#define __DEPRECATED_IN(api_level) __BIONIC_AVAILABILITY(deprecated=api_level)
+#define __REMOVED_IN(api_level) __BIONIC_AVAILABILITY(obsoleted=api_level)
 
 // The same availability attribute can't be annotated multiple times. Therefore, the macros are
 // defined for the configuration that it is valid for so that declarations like the below doesn't
@@ -68,23 +76,19 @@
 //
 // hasn't been supported and won't be.
 #if !defined(__LP64__)
-#define __INTRODUCED_IN_32(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_64(api_level)
 #else
 #define __INTRODUCED_IN_32(api_level)
-#define __INTRODUCED_IN_64(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #endif
 
 #if defined(__arm__) || defined(__aarch64__)
-#define __INTRODUCED_IN_ARM(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_ARM(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_X86(api_level)
 #elif defined(__i386__) || defined(__x86_64__)
 #define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_X86(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #else
 #define __INTRODUCED_IN_ARM(api_level)
 #define __INTRODUCED_IN_X86(api_level)
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/bits/wctype.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/bits/wctype.h
index a51eca2..0015261 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/bits/wctype.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/bits/wctype.h
@@ -58,8 +58,8 @@
 int iswctype(wint_t __wc, wctype_t __type);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
-wctrans_t wctrans(const char* __name) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wctrans_t wctrans(const char* __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 
 __END_DECLS
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/locale.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/locale.h
index 4290992..8785b24 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/locale.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/locale.h
@@ -96,7 +96,7 @@
   char int_n_sign_posn;
 };
 
-struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+struct lconv* localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
 void freelocale(locale_t __l) __INTRODUCED_IN(21);
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/malloc.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/malloc.h
index 598a50b..bae1f68 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/malloc.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/malloc.h
@@ -204,18 +204,19 @@
 #define M_TSDS_COUNT_MAX (-202)
 
 /**
- * mallopt() option to disable heap initialization across the whole process.
- * If the hardware supports memory tagging, this also disables memory tagging.
- * May be called at any time, including when multiple threads are running. The
- * value is unused but must be set to 0.
+ * mallopt() option to decide whether heap memory is zero-initialized on
+ * allocation across the whole process. May be called at any time, including
+ * when multiple threads are running. An argument of zero indicates memory
+ * should not be zero-initialized, any other value indicates to initialize heap
+ * memory to zero.
  *
- * Note that these memory mitigations are only implemented in scudo and
- * therefore this will have no effect when using another allocator (such as
- * jemalloc on Android Go devices).
+ * Note that this memory mitigations is only implemented in scudo and therefore
+ * this will have no effect when using another allocator (such as jemalloc on
+ * Android Go devices).
  *
  * Available since API level 31.
  */
-#define M_BIONIC_DISABLE_MEMORY_MITIGATIONS (-203)
+#define M_BIONIC_ZERO_INIT (-203)
 
 /**
  * mallopt() option to change the heap tagging state. May be called at any
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/math.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/math.h
index 8c084b2..040dc96 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/math.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/math.h
@@ -178,9 +178,9 @@
 long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
 
 /* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
+double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
 
 double cbrt(double __x);
 float cbrtf(float __x);
@@ -280,11 +280,11 @@
 
 double nextafter(double __x, double __y);
 float nextafterf(float __x, float __y);
-long double nextafterl(long double __x, long double __y) __RENAME_LDBL(nextafter, 3, 21) __VERSIONER_NO_GUARD;
+long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
+double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
 float nexttowardf(float __x, long double __y);
-long double nexttowardl(long double __x, long double __y) __RENAME_LDBL(nexttoward, 18, 18) __VERSIONER_NO_GUARD;
+long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);
 
 double fdim(double __x, double __y);
 float fdimf(float __x, float __y);
@@ -300,7 +300,7 @@
 
 double fma(double __x, double __y, double __z);
 float fmaf(float __x, float __y, float __z);
-long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL(fma, 3, 21) __VERSIONER_NO_GUARD;
+long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL_NO_GUARD_FOR_NDK(fma, 3, 21);
 
 #define isgreater(x, y) __builtin_isgreater((x), (y))
 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/stdlib.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/stdlib.h
index dc7b694..d7fdb4a 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/stdlib.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/stdlib.h
@@ -160,10 +160,10 @@
 const char* getprogname(void) __INTRODUCED_IN(21);
 void setprogname(const char* __name) __INTRODUCED_IN(21);
 
-int mblen(const char* __s, size_t __n) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+int mblen(const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n);
-int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
-int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/sys/cdefs.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/sys/cdefs.h
index b4556a7..b1bd713 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/sys/cdefs.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86/include/bionic/libc/include/sys/cdefs.h
@@ -202,11 +202,18 @@
  * Note that some functions have their __RENAME_LDBL commented out as a sign that although we could
  * use __RENAME_LDBL it would actually cause the function to be introduced later because the
  * `long double` variant appeared before the `double` variant.
+ *
+ * The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+ * allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+ * libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+ * those APIs will still cause a link error.
  */
 #if defined(__LP64__) || defined(__BIONIC_LP32_USE_LONG_DOUBLE)
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN_NO_GUARD_FOR_NDK(regular_api_level)
 #else
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN_NO_GUARD_FOR_NDK(rewrite_api_level)
 #endif
 
 /*
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/legacy_signal_inlines.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/legacy_signal_inlines.h
index a673446..95c2320 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/legacy_signal_inlines.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/legacy_signal_inlines.h
@@ -45,14 +45,32 @@
 int __libc_current_sigrtmin() __attribute__((__weak__)) __VERSIONER_NO_GUARD;
 
 static __inline int __ndk_legacy___libc_current_sigrtmax() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmax) {
+#endif
     return __libc_current_sigrtmax();
   }
   return __SIGRTMAX; /* Should match __libc_current_sigrtmax. */
 }
 
 static __inline int __ndk_legacy___libc_current_sigrtmin() {
+  /*
+   * The NDK doesn't use libclang_rt.builtins yet (https://github.com/android/ndk/issues/1231) so it
+   * can't use __builtin_available, but the platform builds with -Werror=unguarded-availability so
+   * it requires __builtin_available.
+   */
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
   if (__builtin_available(android 21, *)) {
+#else
+  if (__libc_current_sigrtmin) {
+#endif
     return __libc_current_sigrtmin();
   }
   return __SIGRTMIN + 7; /* Should match __libc_current_sigrtmin. */
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/versioning.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/versioning.h
index 2b9a027..214acf2 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/versioning.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/android/versioning.h
@@ -21,12 +21,14 @@
 #if defined(__BIONIC_VERSIONER)
 
 #define __INTRODUCED_IN(api_level) __attribute__((annotate("introduced_in=" #api_level)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in=" #api_level))) __VERSIONER_NO_GUARD
 #define __DEPRECATED_IN(api_level) __attribute__((annotate("deprecated_in=" #api_level)))
 #define __REMOVED_IN(api_level) __attribute__((annotate("obsoleted_in=" #api_level)))
 #define __INTRODUCED_IN_32(api_level) __attribute__((annotate("introduced_in_32=" #api_level)))
 #define __INTRODUCED_IN_64(api_level) __attribute__((annotate("introduced_in_64=" #api_level)))
 #define __INTRODUCED_IN_ARM(api_level) __attribute__((annotate("introduced_in_arm=" #api_level)))
 #define __INTRODUCED_IN_X86(api_level) __attribute__((annotate("introduced_in_x86=" #api_level)))
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __attribute__((annotate("introduced_in_x86=" #api_level))) __VERSIONER_NO_GUARD
 
 #define __VERSIONER_NO_GUARD __attribute__((annotate("versioner_no_guard")))
 #define __VERSIONER_FORTIFY_INLINE __attribute__((annotate("versioner_fortify_inline")))
@@ -42,18 +44,24 @@
 // be enforced. In the case, the absence of 'strict' makes it possible to call an unavailable API
 // without the __builtin_available check, which will cause a link error at runtime.
 // Android platform build system defines this macro along with -Wunguarded-availability
-#if defined(__ANDROID_UNGUARDED_AVAILABILITY__)
-#define __MAYBE_STRICT
+//
+// The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+// allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+// libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+// those APIs will still cause a link error.
+#if defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__)
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level) __INTRODUCED_IN_X86(api_level)
 #else
-#define __MAYBE_STRICT ,strict
+#define __BIONIC_AVAILABILITY(__what) __attribute__((__availability__(android,strict,__what)))
+#define __INTRODUCED_IN_NO_GUARD_FOR_NDK(api_level)
+#define __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(api_level)
 #endif
 
-#define __INTRODUCED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
-#define __DEPRECATED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,deprecated=api_level)))
-#define __REMOVED_IN(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,obsoleted=api_level)))
+#define __INTRODUCED_IN(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
+#define __DEPRECATED_IN(api_level) __BIONIC_AVAILABILITY(deprecated=api_level)
+#define __REMOVED_IN(api_level) __BIONIC_AVAILABILITY(obsoleted=api_level)
 
 // The same availability attribute can't be annotated multiple times. Therefore, the macros are
 // defined for the configuration that it is valid for so that declarations like the below doesn't
@@ -68,23 +76,19 @@
 //
 // hasn't been supported and won't be.
 #if !defined(__LP64__)
-#define __INTRODUCED_IN_32(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_32(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_64(api_level)
 #else
 #define __INTRODUCED_IN_32(api_level)
-#define __INTRODUCED_IN_64(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_64(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #endif
 
 #if defined(__arm__) || defined(__aarch64__)
-#define __INTRODUCED_IN_ARM(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_ARM(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #define __INTRODUCED_IN_X86(api_level)
 #elif defined(__i386__) || defined(__x86_64__)
 #define __INTRODUCED_IN_ARM(api_level)
-#define __INTRODUCED_IN_X86(api_level) \
-    __attribute__((availability(android __MAYBE_STRICT,introduced=api_level)))
+#define __INTRODUCED_IN_X86(api_level) __BIONIC_AVAILABILITY(introduced=api_level)
 #else
 #define __INTRODUCED_IN_ARM(api_level)
 #define __INTRODUCED_IN_X86(api_level)
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/bits/wctype.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/bits/wctype.h
index a51eca2..0015261 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/bits/wctype.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/bits/wctype.h
@@ -58,8 +58,8 @@
 int iswctype(wint_t __wc, wctype_t __type);
 
 typedef const void* wctrans_t;
-wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
-wctrans_t wctrans(const char* __name) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+wint_t towctrans(wint_t __wc, wctrans_t __transform) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
+wctrans_t wctrans(const char* __name) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 
 __END_DECLS
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/locale.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/locale.h
index 4290992..8785b24 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/locale.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/locale.h
@@ -96,7 +96,7 @@
   char int_n_sign_posn;
 };
 
-struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+struct lconv* localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
 void freelocale(locale_t __l) __INTRODUCED_IN(21);
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/malloc.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/malloc.h
index 598a50b..bae1f68 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/malloc.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/malloc.h
@@ -204,18 +204,19 @@
 #define M_TSDS_COUNT_MAX (-202)
 
 /**
- * mallopt() option to disable heap initialization across the whole process.
- * If the hardware supports memory tagging, this also disables memory tagging.
- * May be called at any time, including when multiple threads are running. The
- * value is unused but must be set to 0.
+ * mallopt() option to decide whether heap memory is zero-initialized on
+ * allocation across the whole process. May be called at any time, including
+ * when multiple threads are running. An argument of zero indicates memory
+ * should not be zero-initialized, any other value indicates to initialize heap
+ * memory to zero.
  *
- * Note that these memory mitigations are only implemented in scudo and
- * therefore this will have no effect when using another allocator (such as
- * jemalloc on Android Go devices).
+ * Note that this memory mitigations is only implemented in scudo and therefore
+ * this will have no effect when using another allocator (such as jemalloc on
+ * Android Go devices).
  *
  * Available since API level 31.
  */
-#define M_BIONIC_DISABLE_MEMORY_MITIGATIONS (-203)
+#define M_BIONIC_ZERO_INIT (-203)
 
 /**
  * mallopt() option to change the heap tagging state. May be called at any
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/math.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/math.h
index 8c084b2..040dc96 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/math.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/math.h
@@ -178,9 +178,9 @@
 long double scalbnl(long double __x, int __exponent) __RENAME_LDBL(scalbn, 3, 3);
 
 /* TODO: once the NDK only supports >= 18, use __RENAME_LDBL here too. */
-double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
-long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86(18) __VERSIONER_NO_GUARD;
+double scalbln(double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+float scalblnf(float __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
+long double scalblnl(long double __x, long __exponent) __INTRODUCED_IN_X86_NO_GUARD_FOR_NDK(18);
 
 double cbrt(double __x);
 float cbrtf(float __x);
@@ -280,11 +280,11 @@
 
 double nextafter(double __x, double __y);
 float nextafterf(float __x, float __y);
-long double nextafterl(long double __x, long double __y) __RENAME_LDBL(nextafter, 3, 21) __VERSIONER_NO_GUARD;
+long double nextafterl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nextafter, 3, 21);
 
-double nexttoward(double __x, long double __y) __INTRODUCED_IN(18) __VERSIONER_NO_GUARD;
+double nexttoward(double __x, long double __y) __INTRODUCED_IN_NO_GUARD_FOR_NDK(18);
 float nexttowardf(float __x, long double __y);
-long double nexttowardl(long double __x, long double __y) __RENAME_LDBL(nexttoward, 18, 18) __VERSIONER_NO_GUARD;
+long double nexttowardl(long double __x, long double __y) __RENAME_LDBL_NO_GUARD_FOR_NDK(nexttoward, 18, 18);
 
 double fdim(double __x, double __y);
 float fdimf(float __x, float __y);
@@ -300,7 +300,7 @@
 
 double fma(double __x, double __y, double __z);
 float fmaf(float __x, float __y, float __z);
-long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL(fma, 3, 21) __VERSIONER_NO_GUARD;
+long double fmal(long double __x, long double __y, long double __z) __RENAME_LDBL_NO_GUARD_FOR_NDK(fma, 3, 21);
 
 #define isgreater(x, y) __builtin_isgreater((x), (y))
 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/stdlib.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/stdlib.h
index dc7b694..d7fdb4a 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/stdlib.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/stdlib.h
@@ -160,10 +160,10 @@
 const char* getprogname(void) __INTRODUCED_IN(21);
 void setprogname(const char* __name) __INTRODUCED_IN(21);
 
-int mblen(const char* __s, size_t __n) __INTRODUCED_IN(26) __VERSIONER_NO_GUARD;
+int mblen(const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(26);
 size_t mbstowcs(wchar_t* __dst, const char* __src, size_t __n);
-int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
-int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
+int mbtowc(wchar_t* __wc_ptr, const char* __s, size_t __n) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
+int wctomb(char* __dst, wchar_t __wc) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);
 
 size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
 
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/sys/cdefs.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/sys/cdefs.h
index b4556a7..b1bd713 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/sys/cdefs.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/android/x86_64/include/bionic/libc/include/sys/cdefs.h
@@ -202,11 +202,18 @@
  * Note that some functions have their __RENAME_LDBL commented out as a sign that although we could
  * use __RENAME_LDBL it would actually cause the function to be introduced later because the
  * `long double` variant appeared before the `double` variant.
+ *
+ * The _NO_GUARD_FOR_NDK variants keep the __VERSIONER_NO_GUARD behavior working for the NDK. This
+ * allows libc++ to refer to these functions in inlines without needing to guard them, needed since
+ * libc++ doesn't currently guard these calls. There's no risk to the apps though because using
+ * those APIs will still cause a link error.
  */
 #if defined(__LP64__) || defined(__BIONIC_LP32_USE_LONG_DOUBLE)
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN(regular_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __INTRODUCED_IN_NO_GUARD_FOR_NDK(regular_api_level)
 #else
 #define __RENAME_LDBL(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN(rewrite_api_level)
+#define __RENAME_LDBL_NO_GUARD_FOR_NDK(rewrite,rewrite_api_level,regular_api_level) __RENAME(rewrite) __INTRODUCED_IN_NO_GUARD_FOR_NDK(rewrite_api_level)
 #endif
 
 /*
diff --git a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/common_os/include/system/logging/liblog/include/log/log_main.h b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
index 1bd1c8a..799a8e2 100644
--- a/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
+++ b/current/sdk/android/include/prebuilts/runtime/mainline/runtime/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
@@ -364,13 +364,11 @@
 int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int default_prio);
 
 #if LOG_NDEBUG /* Production */
-#define android_testLog(prio, tag)                                           \
-  (__android_log_is_loggable_len(prio, tag, ((tag) && *(tag)) ? strlen(tag) : 0, \
-                                 ANDROID_LOG_DEBUG) != 0)
+#define android_testLog(prio, tag) \
+  (__android_log_is_loggable_len(prio, tag, (tag) ? strlen(tag) : 0, ANDROID_LOG_DEBUG) != 0)
 #else
-#define android_testLog(prio, tag)                                           \
-  (__android_log_is_loggable_len(prio, tag, ((tag) && *(tag)) ? strlen(tag) : 0, \
-                                 ANDROID_LOG_VERBOSE) != 0)
+#define android_testLog(prio, tag) \
+  (__android_log_is_loggable_len(prio, tag, (tag) ? strlen(tag) : 0, ANDROID_LOG_VERBOSE) != 0)
 #endif
 
 #if defined(__clang__)
diff --git a/current/sdk/android/x86/lib/libandroidio.so b/current/sdk/android/x86/lib/libandroidio.so
index 9448abd..d323a05 100755
--- a/current/sdk/android/x86/lib/libandroidio.so
+++ b/current/sdk/android/x86/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libdexfile_external.so b/current/sdk/android/x86/lib/libdexfile_external.so
index aa922ea..f54a3cd 100755
--- a/current/sdk/android/x86/lib/libdexfile_external.so
+++ b/current/sdk/android/x86/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libdexfile_external_static.a b/current/sdk/android/x86/lib/libdexfile_external_static.a
index c2c867c..c896365 100644
--- a/current/sdk/android/x86/lib/libdexfile_external_static.a
+++ b/current/sdk/android/x86/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/android/x86/lib/libdexfile_support.a b/current/sdk/android/x86/lib/libdexfile_support.a
index 58481fc..2c90863 100644
--- a/current/sdk/android/x86/lib/libdexfile_support.a
+++ b/current/sdk/android/x86/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/android/x86/lib/libdexfile_support.so b/current/sdk/android/x86/lib/libdexfile_support.so
index 91f3270..073f4b2 100755
--- a/current/sdk/android/x86/lib/libdexfile_support.so
+++ b/current/sdk/android/x86/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libnativebridge.so b/current/sdk/android/x86/lib/libnativebridge.so
index b1e06ba..04c48ae 100755
--- a/current/sdk/android/x86/lib/libnativebridge.so
+++ b/current/sdk/android/x86/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libnativehelper.so b/current/sdk/android/x86/lib/libnativehelper.so
index 5f76e8e..97e492a 100755
--- a/current/sdk/android/x86/lib/libnativehelper.so
+++ b/current/sdk/android/x86/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libnativehelper_lazy.a b/current/sdk/android/x86/lib/libnativehelper_lazy.a
index 12a2d3b..f91405f 100644
--- a/current/sdk/android/x86/lib/libnativehelper_lazy.a
+++ b/current/sdk/android/x86/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/android/x86/lib/libnativeloader.so b/current/sdk/android/x86/lib/libnativeloader.so
index 498dcbd..29fbba7 100755
--- a/current/sdk/android/x86/lib/libnativeloader.so
+++ b/current/sdk/android/x86/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/android/x86/lib/libsigchain.a b/current/sdk/android/x86/lib/libsigchain.a
index cca4ea4..3717005 100644
--- a/current/sdk/android/x86/lib/libsigchain.a
+++ b/current/sdk/android/x86/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/android/x86/lib/libsigchain.so b/current/sdk/android/x86/lib/libsigchain.so
index c7d3340..e822116 100755
--- a/current/sdk/android/x86/lib/libsigchain.so
+++ b/current/sdk/android/x86/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libandroidio.so b/current/sdk/android/x86_64/lib/libandroidio.so
index 1d9701d..99c275c 100755
--- a/current/sdk/android/x86_64/lib/libandroidio.so
+++ b/current/sdk/android/x86_64/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libdexfile_external.so b/current/sdk/android/x86_64/lib/libdexfile_external.so
index d92d497..136eeca 100755
--- a/current/sdk/android/x86_64/lib/libdexfile_external.so
+++ b/current/sdk/android/x86_64/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libdexfile_external_static.a b/current/sdk/android/x86_64/lib/libdexfile_external_static.a
index 70a9bec..efd7819 100644
--- a/current/sdk/android/x86_64/lib/libdexfile_external_static.a
+++ b/current/sdk/android/x86_64/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libdexfile_support.a b/current/sdk/android/x86_64/lib/libdexfile_support.a
index dd5b754..4d4324f 100644
--- a/current/sdk/android/x86_64/lib/libdexfile_support.a
+++ b/current/sdk/android/x86_64/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libdexfile_support.so b/current/sdk/android/x86_64/lib/libdexfile_support.so
index 9408f50..7d44f2e 100755
--- a/current/sdk/android/x86_64/lib/libdexfile_support.so
+++ b/current/sdk/android/x86_64/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libnativebridge.so b/current/sdk/android/x86_64/lib/libnativebridge.so
index 156f059..d69e77f 100755
--- a/current/sdk/android/x86_64/lib/libnativebridge.so
+++ b/current/sdk/android/x86_64/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libnativehelper.so b/current/sdk/android/x86_64/lib/libnativehelper.so
index 5439c11..254a838 100755
--- a/current/sdk/android/x86_64/lib/libnativehelper.so
+++ b/current/sdk/android/x86_64/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libnativehelper_lazy.a b/current/sdk/android/x86_64/lib/libnativehelper_lazy.a
index a4f0a70..b07d3c7 100644
--- a/current/sdk/android/x86_64/lib/libnativehelper_lazy.a
+++ b/current/sdk/android/x86_64/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libnativeloader.so b/current/sdk/android/x86_64/lib/libnativeloader.so
index defa80c..f57278f 100755
--- a/current/sdk/android/x86_64/lib/libnativeloader.so
+++ b/current/sdk/android/x86_64/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libsigchain.a b/current/sdk/android/x86_64/lib/libsigchain.a
index 0a534b5..df4694a 100644
--- a/current/sdk/android/x86_64/lib/libsigchain.a
+++ b/current/sdk/android/x86_64/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/android/x86_64/lib/libsigchain.so b/current/sdk/android/x86_64/lib/libsigchain.so
index de29074..5bc778c 100755
--- a/current/sdk/android/x86_64/lib/libsigchain.so
+++ b/current/sdk/android/x86_64/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/arm/lib/libctstiagent.a b/current/sdk/arm/lib/libctstiagent.a
index 7437c9c..a79b621 100644
--- a/current/sdk/arm/lib/libctstiagent.a
+++ b/current/sdk/arm/lib/libctstiagent.a
Binary files differ
diff --git a/current/sdk/arm/lib/libnativebridge_lazy.so b/current/sdk/arm/lib/libnativebridge_lazy.so
index fca63d7..127f13f 100755
--- a/current/sdk/arm/lib/libnativebridge_lazy.so
+++ b/current/sdk/arm/lib/libnativebridge_lazy.so
Binary files differ
diff --git a/current/sdk/arm/lib/libnativehelper_compat_libc++.so b/current/sdk/arm/lib/libnativehelper_compat_libc++.so
index 38f250e..4e19ac0 100755
--- a/current/sdk/arm/lib/libnativehelper_compat_libc++.so
+++ b/current/sdk/arm/lib/libnativehelper_compat_libc++.so
Binary files differ
diff --git a/current/sdk/arm/lib/libnativeloader_lazy.so b/current/sdk/arm/lib/libnativeloader_lazy.so
index 40ec86f..df9f133 100755
--- a/current/sdk/arm/lib/libnativeloader_lazy.so
+++ b/current/sdk/arm/lib/libnativeloader_lazy.so
Binary files differ
diff --git a/current/sdk/arm64/lib/libctstiagent.a b/current/sdk/arm64/lib/libctstiagent.a
index 5a13b1f..2b2408e 100644
--- a/current/sdk/arm64/lib/libctstiagent.a
+++ b/current/sdk/arm64/lib/libctstiagent.a
Binary files differ
diff --git a/current/sdk/arm64/lib/libnativebridge_lazy.so b/current/sdk/arm64/lib/libnativebridge_lazy.so
index b7a45e5..caaf120 100755
--- a/current/sdk/arm64/lib/libnativebridge_lazy.so
+++ b/current/sdk/arm64/lib/libnativebridge_lazy.so
Binary files differ
diff --git a/current/sdk/arm64/lib/libnativehelper_compat_libc++.so b/current/sdk/arm64/lib/libnativehelper_compat_libc++.so
index 6670769..f836ad0 100755
--- a/current/sdk/arm64/lib/libnativehelper_compat_libc++.so
+++ b/current/sdk/arm64/lib/libnativehelper_compat_libc++.so
Binary files differ
diff --git a/current/sdk/arm64/lib/libnativeloader_lazy.so b/current/sdk/arm64/lib/libnativeloader_lazy.so
index 633a835..70ead51 100755
--- a/current/sdk/arm64/lib/libnativeloader_lazy.so
+++ b/current/sdk/arm64/lib/libnativeloader_lazy.so
Binary files differ
diff --git a/current/sdk/common_os/include/art/libartbase/base/file_utils.h b/current/sdk/common_os/include/art/libartbase/base/file_utils.h
index bcab288..67caaa6 100644
--- a/current/sdk/common_os/include/art/libartbase/base/file_utils.h
+++ b/current/sdk/common_os/include/art/libartbase/base/file_utils.h
@@ -28,9 +28,12 @@
 namespace art {
 
 static constexpr const char* kAndroidArtApexDefaultPath = "/apex/com.android.art";
+static constexpr const char* kArtApexDataDefaultPath = "/data/misc/apexdata/com.android.art";
 static constexpr const char* kAndroidConscryptApexDefaultPath = "/apex/com.android.conscrypt";
 static constexpr const char* kAndroidI18nApexDefaultPath = "/apex/com.android.i18n";
 
+static constexpr const char* kArtImageExtension = "art";
+
 // These methods return the Android Root, which is the historical location of
 // the Android "system" directory, containing the built Android artifacts. On
 // target, this is normally "/system". On host this is usually a directory under
@@ -62,30 +65,53 @@
 // Find $ANDROID_DATA, /data, or return an empty string.
 std::string GetAndroidDataSafe(/*out*/ std::string* error_msg);
 
+// Find $ART_APEX_DATA, /data/misc/apexdata/com.android.art, or abort.
+std::string GetArtApexData();
+
 // Returns the default boot image location (ANDROID_ROOT/framework/boot.art).
 // Returns an empty string if ANDROID_ROOT is not set.
 std::string GetDefaultBootImageLocation(std::string* error_msg);
 
-// Returns the default boot image location, based on the passed android root.
+// Returns the default boot image location, based on the passed `android_root`.
 std::string GetDefaultBootImageLocation(const std::string& android_root);
 
-// Returns the dalvik-cache location, with subdir appended. Returns the empty string if the cache
-// could not be found.
-std::string GetDalvikCache(const char* subdir);
-
 // Return true if we found the dalvik cache and stored it in the dalvik_cache argument.
-// have_android_data will be set to true if we have an ANDROID_DATA that exists,
-// dalvik_cache_exists will be true if there is a dalvik-cache directory that is present.
-// The flag is_global_cache tells whether this cache is /data/dalvik-cache.
+// `have_android_data` will be set to true if we have an ANDROID_DATA that exists,
+// `dalvik_cache_exists` will be true if there is a dalvik-cache directory that is present.
+// The flag `is_global_cache` tells whether this cache is /data/dalvik-cache.
 void GetDalvikCache(const char* subdir, bool create_if_absent, std::string* dalvik_cache,
                     bool* have_android_data, bool* dalvik_cache_exists, bool* is_global_cache);
 
 // Returns the absolute dalvik-cache path for a DexFile or OatFile. The path returned will be
-// rooted at cache_location.
-bool GetDalvikCacheFilename(const char* file_location, const char* cache_location,
+// rooted at `cache_location`.
+bool GetDalvikCacheFilename(const char* location, const char* cache_location,
                             std::string* filename, std::string* error_msg);
 
-// Returns the system location for an image
+// Gets the oat location in the ART APEX data directory for a DEX file installed anywhere other
+// than in an APEX. Returns the oat filename if `location` is valid, empty string otherwise.
+std::string GetApexDataOatFilename(std::string_view location, InstructionSet isa);
+
+// Gets the odex location in the ART APEX data directory for a DEX file installed anywhere other
+// than in an APEX. Returns the odex filename if `location` is valid, empty string otherwise.
+std::string GetApexDataOdexFilename(std::string_view location, InstructionSet isa);
+
+// Gets the boot image in the ART APEX data directory for a DEX file installed anywhere other
+// than in an APEX. Returns the image location if `dex_location` is valid, empty string otherwise.
+std::string GetApexDataBootImage(std::string_view dex_location);
+
+// Gets the image in the ART APEX data directory for a DEX file installed installed anywhere other
+// than in an APEX. Returns the image location if `dex_location` is valid, empty string otherwise.
+std::string GetApexDataImage(std::string_view dex_location);
+
+// Gets the name of a file in the ART APEX directory dalvik-cache. This method assumes the
+// `dex_location` is for an application and that the `dex_location` is not within an APEX.
+// Returns the location of the file in the dalvik-cache
+std::string GetApexDataDalvikCacheFilename(std::string_view dex_location,
+                                           InstructionSet isa,
+                                           std::string_view file_extension);
+
+// Returns the system location for an image. This method inserts the `isa` between the
+// dirname and basename of `location`.
 std::string GetSystemImageFilename(const char* location, InstructionSet isa);
 
 // Returns the vdex filename for the given oat filename.
@@ -96,28 +122,31 @@
 // a period, and `new_extension`.
 // Example: ReplaceFileExtension("foo.bar", "abc") == "foo.abc"
 //          ReplaceFileExtension("foo", "abc") == "foo.abc"
-std::string ReplaceFileExtension(const std::string& filename, const std::string& new_extension);
+std::string ReplaceFileExtension(std::string_view filename, std::string_view new_extension);
 
 // Return whether the location is on /apex/com.android.art
-bool LocationIsOnArtModule(const char* location);
+bool LocationIsOnArtModule(std::string_view location);
+
+// Return whether the location is on /data/misc/apexdata/com.android.art/.
+bool LocationIsOnArtApexData(std::string_view location);
 
 // Return whether the location is on /apex/com.android.conscrypt
-bool LocationIsOnConscryptModule(const char* location);
+bool LocationIsOnConscryptModule(std::string_view location);
 
 // Return whether the location is on /apex/com.android.i18n
-bool LocationIsOnI18nModule(const char* location);
+bool LocationIsOnI18nModule(std::string_view location);
 
 // Return whether the location is on system (i.e. android root).
 bool LocationIsOnSystem(const char* location);
 
-// Return whether the location is on system/framework (i.e. android_root/framework).
-bool LocationIsOnSystemFramework(const char* location);
+// Return whether the location is on system/framework (i.e. $ANDROID_ROOT/framework).
+bool LocationIsOnSystemFramework(std::string_view location);
 
 // Return whether the location is on system_ext/framework
-bool LocationIsOnSystemExtFramework(const char* location);
+bool LocationIsOnSystemExtFramework(std::string_view location);
 
 // Return whether the location is on /apex/.
-bool LocationIsOnApex(const char* location);
+bool LocationIsOnApex(std::string_view location);
 
 // Compare the ART module root against android root. Returns true if they are
 // both known and distinct. This is meant to be a proxy for 'running with apex'.
diff --git a/current/sdk/common_os/include/art/libartbase/base/flags.h b/current/sdk/common_os/include/art/libartbase/base/flags.h
new file mode 100644
index 0000000..5bd18e5
--- /dev/null
+++ b/current/sdk/common_os/include/art/libartbase/base/flags.h
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ART_LIBARTBASE_BASE_FLAGS_H_
+#define ART_LIBARTBASE_BASE_FLAGS_H_
+
+#include <forward_list>
+#include <optional>
+#include <string>
+#include <variant>
+
+// This file defines a set of flags that can be used to enable/disable features within ART or
+// otherwise tune ART's behavior. Flags can be set through command line options, server side
+// configuration, system properties, or default values. This flexibility enables easier development
+// and also larger experiments.
+//
+// The flags are defined in the Flags struct near the bottom of the file. To define a new flag, add
+// a Flag field to the struct. Then to read the value of the flag, use gFlag.MyNewFlag().
+
+#pragma clang diagnostic push
+#pragma clang diagnostic error "-Wconversion"
+
+namespace art {
+
+// FlagMetaBase handles automatically adding flags to the command line parser. It is parameterized
+// by all supported flag types. In general, this should be treated as though it does not exist and
+// FlagBase, which is already specialized to the types we support, should be used instead.
+template <typename... T>
+class FlagMetaBase {
+ public:
+  virtual ~FlagMetaBase() {}
+
+  template <typename Builder>
+  static void AddFlagsToCmdlineParser(Builder* builder) {
+    for (auto* flag : ALL_FLAGS) {
+      // Each flag can return a pointer to where its command line value is stored. Because these can
+      // be different types, the return value comes as a variant. The cases list below contains a
+      // lambda that is specialized to handle each branch of the variant and call the correct
+      // methods on the command line parser builder.
+      FlagValuePointer location = flag->GetLocation();
+      auto cases = {[&]() {
+        if (std::holds_alternative<std::optional<T>*>(location)) {
+          builder = &builder->Define(flag->command_line_argument_name_.c_str())
+                         .template WithType<T>()
+                         .IntoLocation(std::get<std::optional<T>*>(location));
+        }
+      }...};
+      for (auto c : cases) {
+        c();
+      }
+    }
+  }
+
+ protected:
+  using FlagValuePointer = std::variant<std::optional<T>*...>;
+  static std::forward_list<FlagMetaBase<T...>*> ALL_FLAGS;
+
+  std::string command_line_argument_name_;
+  std::string system_property_name_;
+  std::string server_setting_name_;
+
+  virtual FlagValuePointer GetLocation() = 0;
+};
+
+using FlagBase = FlagMetaBase<bool>;
+
+template <>
+std::forward_list<FlagBase*> FlagBase::ALL_FLAGS;
+
+// This class defines a flag with a value of a particular type.
+template <typename Value>
+class Flag : public FlagBase {
+ public:
+  // Create a new Flag. The name parameter is used to generate the names from the various parameter
+  // sources. See the documentation on the Flags struct for an example.
+  explicit Flag(const std::string& name, Value default_value = {});
+  virtual ~Flag() {}
+
+  // Returns the value of the flag.
+  //
+  // The value returned will be the command line argument, if present, otherwise the
+  // server-configured value, if present, otherwise the system property value, if present, and
+  // finally, the default value.
+  Value operator()();
+
+  // Reload the server-configured value and system property values. In general this should not be
+  // used directly, but it can be used to support reloading the value without restarting the device.
+  void Reload();
+
+ protected:
+  FlagValuePointer GetLocation() override { return &from_command_line_; }
+
+ private:
+  bool initialized_{false};
+  const Value default_;
+  std::optional<Value> from_command_line_;
+  std::optional<Value> from_system_property_;
+  std::optional<Value> from_server_setting_;
+};
+
+// This struct contains the list of ART flags. Flags are parameterized by the type of value they
+// support (bool, int, string, etc.). In addition to field name, flags have a name for the parameter
+// as well.
+//
+// Example:
+//
+//     Flag<bool> WriteMetricsToLog{"metrics.write-to-log", false};
+//
+// This creates a boolean flag that can be read through gFlags.WriteMetricsToLog(). The default
+// value is false. Note that the default value can be left unspecified, in which the value of the
+// type's default constructor will be used.
+//
+// The flag can be set through the following generated means:
+//
+// Command Line:
+//
+//     -Xmetrics-write-to-log=true
+//
+// Server Side Configuration:
+//
+//     runtime_native_boot.metrics_write_to_log
+//
+// System Property:
+//
+//     setprop dalvik.vm.metrics.write-to-log true
+struct Flags {
+  Flag<bool> WriteMetricsToLog{"metrics.write-to-log", false};
+};
+
+// This is the actual instance of all the flags.
+extern Flags gFlags;
+
+}  // namespace art
+
+#pragma clang diagnostic pop  // -Wconversion
+
+#endif  // ART_LIBARTBASE_BASE_FLAGS_H_
diff --git a/current/sdk/common_os/include/art/libartbase/base/metrics/metrics.h b/current/sdk/common_os/include/art/libartbase/base/metrics/metrics.h
index 20bbc52..f6eed56 100644
--- a/current/sdk/common_os/include/art/libartbase/base/metrics/metrics.h
+++ b/current/sdk/common_os/include/art/libartbase/base/metrics/metrics.h
@@ -303,7 +303,7 @@
 // LogBackend, but we will probably want a more machine-readable format in the future.
 class FileBackend : public StringBackend {
  public:
-  explicit FileBackend(std::string filename);
+  explicit FileBackend(const std::string& filename);
 
   void BeginReport(uint64_t timestamp_millis) override;
   void EndReport() override;
diff --git a/current/sdk/common_os/include/prebuilts/runtime/mainline/platform/sdk/common_os/include/system/logging/liblog/include/log/log_main.h b/current/sdk/common_os/include/prebuilts/runtime/mainline/platform/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
index 1bd1c8a..799a8e2 100644
--- a/current/sdk/common_os/include/prebuilts/runtime/mainline/platform/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
+++ b/current/sdk/common_os/include/prebuilts/runtime/mainline/platform/sdk/common_os/include/system/logging/liblog/include/log/log_main.h
@@ -364,13 +364,11 @@
 int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int default_prio);
 
 #if LOG_NDEBUG /* Production */
-#define android_testLog(prio, tag)                                           \
-  (__android_log_is_loggable_len(prio, tag, ((tag) && *(tag)) ? strlen(tag) : 0, \
-                                 ANDROID_LOG_DEBUG) != 0)
+#define android_testLog(prio, tag) \
+  (__android_log_is_loggable_len(prio, tag, (tag) ? strlen(tag) : 0, ANDROID_LOG_DEBUG) != 0)
 #else
-#define android_testLog(prio, tag)                                           \
-  (__android_log_is_loggable_len(prio, tag, ((tag) && *(tag)) ? strlen(tag) : 0, \
-                                 ANDROID_LOG_VERBOSE) != 0)
+#define android_testLog(prio, tag) \
+  (__android_log_is_loggable_len(prio, tag, (tag) ? strlen(tag) : 0, ANDROID_LOG_VERBOSE) != 0)
 #endif
 
 #if defined(__clang__)
diff --git a/current/sdk/java/bouncycastle.jar b/current/sdk/java/bouncycastle.jar
index 2ea8cb8..15b73d8 100644
--- a/current/sdk/java/bouncycastle.jar
+++ b/current/sdk/java/bouncycastle.jar
Binary files differ
diff --git a/current/sdk/java/core-current-stubs-for-system-modules.jar b/current/sdk/java/core-current-stubs-for-system-modules.jar
index 645bae3..bc567a2 100644
--- a/current/sdk/java/core-current-stubs-for-system-modules.jar
+++ b/current/sdk/java/core-current-stubs-for-system-modules.jar
Binary files differ
diff --git a/current/sdk/java/core-oj.jar b/current/sdk/java/core-oj.jar
index 33fd216..3bf0486 100644
--- a/current/sdk/java/core-oj.jar
+++ b/current/sdk/java/core-oj.jar
Binary files differ
diff --git a/current/sdk/java/core.current.stubs.jar b/current/sdk/java/core.current.stubs.jar
index e7a7cc8..b24c002 100644
--- a/current/sdk/java/core.current.stubs.jar
+++ b/current/sdk/java/core.current.stubs.jar
Binary files differ
diff --git a/current/sdk/java/legacy.art.module.platform.api.stubs.jar b/current/sdk/java/legacy.art.module.platform.api.stubs.jar
index 8e68a18..23ca084 100644
--- a/current/sdk/java/legacy.art.module.platform.api.stubs.jar
+++ b/current/sdk/java/legacy.art.module.platform.api.stubs.jar
Binary files differ
diff --git a/current/sdk/java/legacy.core.platform.api.stubs.jar b/current/sdk/java/legacy.core.platform.api.stubs.jar
index 804c444..4bb488b 100644
--- a/current/sdk/java/legacy.core.platform.api.stubs.jar
+++ b/current/sdk/java/legacy.core.platform.api.stubs.jar
Binary files differ
diff --git a/current/sdk/java/stable.art.module.platform.api.stubs.jar b/current/sdk/java/stable.art.module.platform.api.stubs.jar
index 20408c0..0b3ff46 100644
--- a/current/sdk/java/stable.art.module.platform.api.stubs.jar
+++ b/current/sdk/java/stable.art.module.platform.api.stubs.jar
Binary files differ
diff --git a/current/sdk/java/stable.core.platform.api.stubs.jar b/current/sdk/java/stable.core.platform.api.stubs.jar
index 187039c..3107a31 100644
--- a/current/sdk/java/stable.core.platform.api.stubs.jar
+++ b/current/sdk/java/stable.core.platform.api.stubs.jar
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libandroidio.so b/current/sdk/linux_glibc/x86/lib/libandroidio.so
index dffece6..166bfa5 100755
--- a/current/sdk/linux_glibc/x86/lib/libandroidio.so
+++ b/current/sdk/linux_glibc/x86/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libdexfile_external.so b/current/sdk/linux_glibc/x86/lib/libdexfile_external.so
index 196ceeb..6f4e2cc 100755
--- a/current/sdk/linux_glibc/x86/lib/libdexfile_external.so
+++ b/current/sdk/linux_glibc/x86/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libdexfile_external_static.a b/current/sdk/linux_glibc/x86/lib/libdexfile_external_static.a
index 7b15691..b5376b4 100644
--- a/current/sdk/linux_glibc/x86/lib/libdexfile_external_static.a
+++ b/current/sdk/linux_glibc/x86/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libdexfile_support.a b/current/sdk/linux_glibc/x86/lib/libdexfile_support.a
index 4280124..3f77bab 100644
--- a/current/sdk/linux_glibc/x86/lib/libdexfile_support.a
+++ b/current/sdk/linux_glibc/x86/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libdexfile_support.so b/current/sdk/linux_glibc/x86/lib/libdexfile_support.so
index aa6e521..6e3be4f 100755
--- a/current/sdk/linux_glibc/x86/lib/libdexfile_support.so
+++ b/current/sdk/linux_glibc/x86/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libnativebridge.so b/current/sdk/linux_glibc/x86/lib/libnativebridge.so
index 4bc9c12..ce30699 100755
--- a/current/sdk/linux_glibc/x86/lib/libnativebridge.so
+++ b/current/sdk/linux_glibc/x86/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libnativehelper.so b/current/sdk/linux_glibc/x86/lib/libnativehelper.so
index 1ee195e..d46ca5d 100755
--- a/current/sdk/linux_glibc/x86/lib/libnativehelper.so
+++ b/current/sdk/linux_glibc/x86/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libnativehelper_lazy.a b/current/sdk/linux_glibc/x86/lib/libnativehelper_lazy.a
index 3eced8a..51ba38f 100644
--- a/current/sdk/linux_glibc/x86/lib/libnativehelper_lazy.a
+++ b/current/sdk/linux_glibc/x86/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libnativeloader.so b/current/sdk/linux_glibc/x86/lib/libnativeloader.so
index 2ee647e..3a2225c 100755
--- a/current/sdk/linux_glibc/x86/lib/libnativeloader.so
+++ b/current/sdk/linux_glibc/x86/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libsigchain.a b/current/sdk/linux_glibc/x86/lib/libsigchain.a
index 3291220..9829a03 100644
--- a/current/sdk/linux_glibc/x86/lib/libsigchain.a
+++ b/current/sdk/linux_glibc/x86/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86/lib/libsigchain.so b/current/sdk/linux_glibc/x86/lib/libsigchain.so
index 608af19..dbbd002 100755
--- a/current/sdk/linux_glibc/x86/lib/libsigchain.so
+++ b/current/sdk/linux_glibc/x86/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libandroidio.so b/current/sdk/linux_glibc/x86_64/lib/libandroidio.so
index a7bafeb..1fc39ff 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libandroidio.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libandroidio.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libdexfile_external.so b/current/sdk/linux_glibc/x86_64/lib/libdexfile_external.so
index 1c884c6..e5372be 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libdexfile_external.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libdexfile_external.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libdexfile_external_static.a b/current/sdk/linux_glibc/x86_64/lib/libdexfile_external_static.a
index 58ea03a..a550fb6 100644
--- a/current/sdk/linux_glibc/x86_64/lib/libdexfile_external_static.a
+++ b/current/sdk/linux_glibc/x86_64/lib/libdexfile_external_static.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.a b/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.a
index 09e673c..fcf21c1 100644
--- a/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.a
+++ b/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.so b/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.so
index f651067..64a0a88 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libdexfile_support.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libnativebridge.so b/current/sdk/linux_glibc/x86_64/lib/libnativebridge.so
index a0399c6..e9ca205 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libnativebridge.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libnativebridge.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libnativehelper.so b/current/sdk/linux_glibc/x86_64/lib/libnativehelper.so
index f672dc2..6b449ff 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libnativehelper.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libnativehelper.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libnativehelper_lazy.a b/current/sdk/linux_glibc/x86_64/lib/libnativehelper_lazy.a
index 45f5341..e5e400e 100644
--- a/current/sdk/linux_glibc/x86_64/lib/libnativehelper_lazy.a
+++ b/current/sdk/linux_glibc/x86_64/lib/libnativehelper_lazy.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libnativeloader.so b/current/sdk/linux_glibc/x86_64/lib/libnativeloader.so
index 808c9ce..169255e 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libnativeloader.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libnativeloader.so
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libsigchain.a b/current/sdk/linux_glibc/x86_64/lib/libsigchain.a
index c59fdec..b06160c 100644
--- a/current/sdk/linux_glibc/x86_64/lib/libsigchain.a
+++ b/current/sdk/linux_glibc/x86_64/lib/libsigchain.a
Binary files differ
diff --git a/current/sdk/linux_glibc/x86_64/lib/libsigchain.so b/current/sdk/linux_glibc/x86_64/lib/libsigchain.so
index d848a52..046413f 100755
--- a/current/sdk/linux_glibc/x86_64/lib/libsigchain.so
+++ b/current/sdk/linux_glibc/x86_64/lib/libsigchain.so
Binary files differ
diff --git a/current/sdk/sdk_library/public/art.module.public.api-stubs.jar b/current/sdk/sdk_library/public/art.module.public.api-stubs.jar
index 83597a7..2173ff7 100644
--- a/current/sdk/sdk_library/public/art.module.public.api-stubs.jar
+++ b/current/sdk/sdk_library/public/art.module.public.api-stubs.jar
Binary files differ
diff --git a/current/sdk/sdk_library/public/art.module.public.api_stub_sources/java/util/regex/Pattern.java b/current/sdk/sdk_library/public/art.module.public.api_stub_sources/java/util/regex/Pattern.java
index bbbf265..64f99f7 100644
--- a/current/sdk/sdk_library/public/art.module.public.api_stub_sources/java/util/regex/Pattern.java
+++ b/current/sdk/sdk_library/public/art.module.public.api_stub_sources/java/util/regex/Pattern.java
@@ -782,8 +782,7 @@
  * @param  flags
  *         Match flags, a bit mask that may include
  *         {@link #CASE_INSENSITIVE}, {@link #MULTILINE}, {@link #DOTALL},
- *         {@link #UNICODE_CASE}, {@link #CANON_EQ}, {@link #UNIX_LINES},
- *         {@link #LITERAL}, {@link #UNICODE_CHARACTER_CLASS}
+ *         {@link #UNICODE_CASE}, {@link #UNIX_LINES}, {@link #LITERAL},
  *         and {@link #COMMENTS}
  *
  * @return the given regular expression compiled into a pattern with the given flags
@@ -1034,6 +1033,8 @@
 public java.util.stream.Stream<java.lang.String> splitAsStream(@androidx.annotation.RecentlyNonNull java.lang.CharSequence input) { throw new RuntimeException("Stub!"); }
 
 /**
+ * This flag is not supported on Android.
+ *
  * Enables canonical equivalence.
  *
  * <p> When this flag is specified then two characters will be considered
@@ -1142,15 +1143,15 @@
 public static final int UNICODE_CASE = 64; // 0x40
 
 /**
+ * This flag is not supported on Android, and Unicode character classes are always
+ * used.
+ *
  * Enables the Unicode version of <i>Predefined character classes</i> and
  * <i>POSIX character classes</i> as defined by <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Technical
  * Standard #18: Unicode Regular Expression</i></a>
  * <i>Annex C: Compatibility Properties</i>.
  * <p>
  *
- * This flag has no effect on Android, unicode character classes are always
- * used.
- *
  * @since 1.7
  */
 
diff --git a/current/sdk/x86/lib/libctstiagent.a b/current/sdk/x86/lib/libctstiagent.a
index 9876ebf..271f268 100644
--- a/current/sdk/x86/lib/libctstiagent.a
+++ b/current/sdk/x86/lib/libctstiagent.a
Binary files differ
diff --git a/current/sdk/x86/lib/libnativebridge_lazy.so b/current/sdk/x86/lib/libnativebridge_lazy.so
index c249736..70ae7e0 100755
--- a/current/sdk/x86/lib/libnativebridge_lazy.so
+++ b/current/sdk/x86/lib/libnativebridge_lazy.so
Binary files differ
diff --git a/current/sdk/x86/lib/libnativehelper_compat_libc++.so b/current/sdk/x86/lib/libnativehelper_compat_libc++.so
index 7baeeee..0c8d14f 100755
--- a/current/sdk/x86/lib/libnativehelper_compat_libc++.so
+++ b/current/sdk/x86/lib/libnativehelper_compat_libc++.so
Binary files differ
diff --git a/current/sdk/x86/lib/libnativeloader_lazy.so b/current/sdk/x86/lib/libnativeloader_lazy.so
index 860de5e..387a7d0 100755
--- a/current/sdk/x86/lib/libnativeloader_lazy.so
+++ b/current/sdk/x86/lib/libnativeloader_lazy.so
Binary files differ
diff --git a/current/sdk/x86_64/lib/libctstiagent.a b/current/sdk/x86_64/lib/libctstiagent.a
index 020a9c9..d1cf657 100644
--- a/current/sdk/x86_64/lib/libctstiagent.a
+++ b/current/sdk/x86_64/lib/libctstiagent.a
Binary files differ
diff --git a/current/sdk/x86_64/lib/libnativebridge_lazy.so b/current/sdk/x86_64/lib/libnativebridge_lazy.so
index df24127..7eea59a 100755
--- a/current/sdk/x86_64/lib/libnativebridge_lazy.so
+++ b/current/sdk/x86_64/lib/libnativebridge_lazy.so
Binary files differ
diff --git a/current/sdk/x86_64/lib/libnativehelper_compat_libc++.so b/current/sdk/x86_64/lib/libnativehelper_compat_libc++.so
index d8bcf54..9949e46 100755
--- a/current/sdk/x86_64/lib/libnativehelper_compat_libc++.so
+++ b/current/sdk/x86_64/lib/libnativehelper_compat_libc++.so
Binary files differ
diff --git a/current/sdk/x86_64/lib/libnativeloader_lazy.so b/current/sdk/x86_64/lib/libnativeloader_lazy.so
index e4f1aec..c3ee183 100755
--- a/current/sdk/x86_64/lib/libnativeloader_lazy.so
+++ b/current/sdk/x86_64/lib/libnativeloader_lazy.so
Binary files differ
diff --git a/current/test-exports/arm/lib/libjavacoretests.so b/current/test-exports/arm/lib/libjavacoretests.so
index 4bd02f8..fc6332f 100755
--- a/current/test-exports/arm/lib/libjavacoretests.so
+++ b/current/test-exports/arm/lib/libjavacoretests.so
Binary files differ
diff --git a/current/test-exports/arm64/lib/libjavacoretests.so b/current/test-exports/arm64/lib/libjavacoretests.so
index bab5217..308943d 100755
--- a/current/test-exports/arm64/lib/libjavacoretests.so
+++ b/current/test-exports/arm64/lib/libjavacoretests.so
Binary files differ
diff --git a/current/test-exports/java/core-libart.jar b/current/test-exports/java/core-libart.jar
index 1ceedc4..3b15335 100644
--- a/current/test-exports/java/core-libart.jar
+++ b/current/test-exports/java/core-libart.jar
Binary files differ
diff --git a/current/test-exports/java/core-tests.jar b/current/test-exports/java/core-tests.jar
index b1b96d5..472b7c9 100644
--- a/current/test-exports/java/core-tests.jar
+++ b/current/test-exports/java/core-tests.jar
Binary files differ
diff --git a/current/test-exports/x86/lib/libjavacoretests.so b/current/test-exports/x86/lib/libjavacoretests.so
index 4800b23..5db992c 100755
--- a/current/test-exports/x86/lib/libjavacoretests.so
+++ b/current/test-exports/x86/lib/libjavacoretests.so
Binary files differ
diff --git a/current/test-exports/x86_64/lib/libjavacoretests.so b/current/test-exports/x86_64/lib/libjavacoretests.so
index d7f950a..eadfb48 100755
--- a/current/test-exports/x86_64/lib/libjavacoretests.so
+++ b/current/test-exports/x86_64/lib/libjavacoretests.so
Binary files differ