Add some MTE-related helpers.

mte_supported() lets code efficiently detect the presence of MTE, and
ScopedDisableMTE lets code disable MTE RAII-style in a particular region
of code.

Bug: 135772972
Change-Id: I628a054b50d79f67f39f35d44232b7a2ae166afb
diff --git a/tests/Android.bp b/tests/Android.bp
index c254839..6320eea 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -38,6 +38,7 @@
         // For glibc.
         "-D__STDC_LIMIT_MACROS",
     ],
+    header_libs: ["bionic_libc_platform_headers"],
     // Make the bionic tests implicitly test bionic's shadow call stack support.
     arch: {
         arm64: {
@@ -49,6 +50,12 @@
         address: false,
     },
     bootstrap: true,
+
+    product_variables: {
+        experimental_mte: {
+            cflags: ["-DANDROID_EXPERIMENTAL_MTE"],
+        },
+    },
 }
 
 // -----------------------------------------------------------------------------
@@ -117,6 +124,7 @@
         "math_force_long_double_test.cpp",
         "membarrier_test.cpp",
         "mntent_test.cpp",
+        "mte_test.cpp",
         "netdb_test.cpp",
         "net_if_test.cpp",
         "netinet_ether_test.cpp",