Merge "Mark libz available to the runtime apex." into main am: 9686674688 am: 5a53893afb

Original change: https://android-review.googlesource.com/c/platform/external/zlib/+/3249672

Change-Id: I03f6b5a68b398f30198a14ca29cf764a00928b0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index afd29a2..a2133aa 100644
--- a/Android.bp
+++ b/Android.bp
@@ -194,6 +194,14 @@
         symbol_file: "libz.map.txt",
     },
 
+    // Even though libz provides "stubs", it still needs to be available to com.android.runtime
+    // because "linker" in the runtime apex is linked statically to libz. (Note that linker is a
+    // static executable.)
+    apex_available: [
+        "com.android.runtime",
+        "//apex_available:platform",
+    ],
+
     // When used by Vendor/Product APEX,
     // libz should be treated like non-stable module.
     // (Hence, should be bundled in APEX).