Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9225375a authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Add a comment on incorrect paths that are required for Q compatibility.

Searching /apex/com.android.runtime/${LIB} in the platform namespace makes
its libraries visible in the wrong namespace - they should be in a separate
"runtime" namespace to keep separation. Furthermore, in R the directory
only contains Bionic internal dependencies that no external package should
depend upon.

However the directory cannot be removed from the search paths because this
linker config is in an APEX that needs to work on Q too, where it is used to
find libclang_rt.hwasan*.so. (The issue with the libraries being visible in
the wrong namespace applies to Q too, but it doesn't have any known
observable effects.)

Hence only add a comment to highlight that it should be cleaned up when the
code has branched and Q compatibility can be dropped.

Test: Build & boot
Bug: 140790209
Bug: 139408016
Change-Id: I2a5e6418977200c56d01f52c0d78dd820cc643a2
parent 8d8c6b72
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -38,9 +38,14 @@ namespace.default.link.platform.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv
namespace.platform.isolated = true

namespace.platform.search.paths  = /system/${LIB}
namespace.platform.search.paths += /apex/com.android.runtime/${LIB}
namespace.platform.asan.search.paths  = /data/asan/system/${LIB}
namespace.platform.asan.search.paths +=           /system/${LIB}

# TODO(b/140790209): These directories are wrong in R and later because they
# only contain Bionic internal libraries dependencies that should not be
# accessed from the outside. However, they may be necessary for APEX builds that
# are pushed to Q. Remove them as soon as Q compatibility is no longer required.
namespace.platform.search.paths += /apex/com.android.runtime/${LIB}
namespace.platform.asan.search.paths += /apex/com.android.runtime/${LIB}

# /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc.