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
This commit is contained in:
Logan Chien
2017-12-20 01:17:32 +08:00
parent 95ba30aa56
commit 43d34c38d8
5 changed files with 156 additions and 17 deletions

View File

@@ -169,7 +169,7 @@ func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.M
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 {