Introduce runtime_libs to cc_binary and cc_library
This commit adds `runtime_libs` to cc_binary and cc_library.
Similar to the `required` property, if a module specifies the
`runtime_libs` properties and it is installed, then the modules
specified in `runtime_libs` will be installed as well.
Differnt from the `required` property, if a module is using VNDK and the
module names specified in `runtime_libs` are resolved to the modules
with both core and vendor variants, then '.vendor' will be appended to
those module names.
For example, if `libb` is vendor_available and `libd` is a vendor lib,
then LOCAL_REQUIRED_MODULES will contain `libb.vendor` (instead of
`libb`).
Bug: 72343507
Test: lunch aosp_arm64_ab-userdebug && make # this runs the unit tests
Test: Create a vendor module with runtime_libs property to a
vendor_available shared library and check the generated Android.mk.
Change-Id: I9e245d80004dab597a5d3db5acd8a09117118db7
diff --git a/android/androidmk.go b/android/androidmk.go
index a60520f..a24d7bc 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -169,7 +169,7 @@
data.Include = "$(BUILD_PREBUILT)"
}
- data.Required = amod.commonProperties.Required
+ data.Required = append(data.Required, amod.commonProperties.Required...)
// Make does not understand LinuxBionic
if amod.Os() == LinuxBionic {