Commit Graph

2 Commits

Author SHA1 Message Date
Jooyung Han df09d173ca Generate linker config with packaged items.
Previously, we gather all deps without checking if a dep is actually one
of packaged items (CopyDepsToZip contents)

For example, following items shouldn't be listed.

provideLibs: "platform-mainline-sdk_libartpalette-system@current.so"
provideLibs: "platform-mainline-sdk_liblog@current.so"
provideLibs: "runtime-module-sdk_libc@current.so"
provideLibs: "runtime-module-sdk_libdl@current.so"
provideLibs: "runtime-module-sdk_libdl_android@current.so"
provideLibs: "runtime-module-sdk_libm@current.so"

Now, we gather only those modules contributing CopyDepsToZip to generate
linker config for android_system_image.

Test: m nothing
Test: m microdroid
Test: conv_linker_config print -s
    .../microdroid/android_common/root/system/etc/linker.config.pb
    shouldn't list sdk members.
Change-Id: Ife5d2193ab59970367d10e196aaaa922c6582862
2021-05-11 11:56:54 +09:00
Jiyong Park fa616137a2 android_system_image that generates linker.config.pb
android_system_image module type is a specialization of the
android_filesystem module type. Currently, it adds a build rule for
creating linker.config.pb from the information about all the other files
in the filesystem and includes linker.config.pb to the filesystem as
well.

To do so, the filesystem module now provides a function pointer which
subtype modules like android_system_image can implement to pass extra
files that they want to package in the filesystem.

In addition, the linkerconfig package is revised to make it possible to
build linker.config.pb file outside of the package.

Bug: 185391776
Test: m microdroid and inspect etc/linker.config.pb in it.

Change-Id: Id89c40b519213062860d7306029b8413d8d36a2d
2021-04-21 09:11:21 +09:00