Reland "Add libdl_android to the Runtime (aka Bionic) APEX".

Before this it ended up in /system.

Test: build & boot
Test: adb shell find system apex -name libdl_android.so | xargs adb shell ls -l
  =>
  apex/com.android.runtime/lib/bionic/libdl_android.so
  apex/com.android.runtime/lib64/bionic/libdl_android.so
  apex/com.android.runtime@1/lib/bionic/libdl_android.so
  apex/com.android.runtime@1/lib64/bionic/libdl_android.so
  system/lib/bootstrap/libdl_android.so
  system/lib/libdl_android.so -> /apex/com.android.runtime/lib/bionic/libdl_android.so
  system/lib64/bootstrap/libdl_android.so
  system/lib64/libdl_android.so -> /apex/com.android.runtime/lib64/bionic/libdl_android.so
Test: atest CtsBionicTestCases
Test: Repro in b/144343305#comment8 together with ag/9754153
Bug: 135753770
Bug: 144343305
Change-Id: I9ccd10b711223ca474e91741711b7b8efd521b2d
This commit is contained in:
Martin Stjernholm 2019-11-11 15:33:22 +00:00
parent 2a8bca7495
commit 3274cc4692
3 changed files with 11 additions and 0 deletions

View file

@ -57,6 +57,11 @@ $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib64/libGLES*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/bionic) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/bionic)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/bionic) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/bionic)
# Ensure libdl_android.so is (only) in the correct locations after the move into
# the Runtime APEX.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.runtime/lib{,64})
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib{,64})
# ************************************************ # ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************ # ************************************************

View file

@ -29,6 +29,7 @@ apex {
"libc", "libc",
"libm", "libm",
"libdl", "libdl",
"libdl_android",
"libc_malloc_debug", "libc_malloc_debug",
"libc_malloc_hooks", "libc_malloc_hooks",
], ],

View file

@ -185,6 +185,11 @@ cc_library {
symbol_file: "libdl_android.map.txt", symbol_file: "libdl_android.map.txt",
versions: ["10000"], versions: ["10000"],
}, },
apex_available: [
"//apex_available:platform",
"com.android.runtime",
],
} }
ndk_library { ndk_library {