diff options
author | 2024-07-12 18:40:30 +0100 | |
---|---|---|
committer | 2024-07-17 13:35:49 +0000 | |
commit | 1fe9dc85a7111f7e678c47ed48b2611b536b9dca (patch) | |
tree | 21af557417817e8796382b0f9e21af8535b12577 /libdexfile | |
parent | 57fe2140f6a78a66cf80c9b46e96acc6b83ec3ed (diff) |
Add stubs to libdexfiled, to make the build system add it to
provideNativeLibs in the debug APEX.
This fixes an issue when the debug APEX com.google.art.debug is in use,
typically in `eng` builds: In that case external (i.e. non-ART) users
of libdexfile_support load libdexfile.so instead of the correct
libdexfiled.so, leading to crashes.
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng
Build and boot
adb shell cat /linkerconfig/ld.config.txt
Verify that com_android_art.shared_libs lines list libdexfiled.so
Bug: 349767294
Change-Id: I042b6126b082009346bfd576d98179857666971b
Diffstat (limited to 'libdexfile')
-rw-r--r-- | libdexfile/Android.bp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp index 68503276cb..84e93e49ef 100644 --- a/libdexfile/Android.bp +++ b/libdexfile/Android.bp @@ -270,11 +270,18 @@ art_cc_library { }, apex_available: [ "com.android.art.debug", - // TODO(b/183882457): This lib doesn't go into com.android.art, but + // TODO(b/183882457): This lib doesn't go into the following APEXes, but // apex_available lists need to be the same for internal libs to avoid - // stubs, and libartd depends on this. + // stubs, and libartd and libprofiled depend on this. "com.android.art", + "test_broken_com.android.art", ], + + // libdexfiled.so implements the libdexfile.so API in com.android.art.debug. + stubs: { + symbol_file: "libdexfile.map.txt", + versions: ["1"], + }, } art_cc_defaults { |