Export runtime dependencies in module-info
This change exports the list of dependencies that are required by
modules at runtime. Note that only the host case is currently
handled.
Bug: 215243373
Test: m out/target/product/vsoc_x86_64/module-info.json
Change-Id: I05199c54da311e59c7ea87595397ee4eecfab6a3
diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk
index aeeb403..9acf6e8 100644
--- a/core/tasks/module-info.mk
+++ b/core/tasks/module-info.mk
@@ -1,4 +1,5 @@
# Print a list of the modules that could be built
+# Currently runtime_dependencies only include the runtime libs information for cc binaries.
MODULE_INFO_JSON := $(PRODUCT_OUT)/module-info.json
@@ -24,6 +25,7 @@
'"test_mainline_modules": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_MAINLINE_MODULES)),"$(w)", )], ' \
'"is_unit_test": "$(ALL_MODULES.$(m).IS_UNIT_TEST)", ' \
'"data": [$(foreach w,$(sort $(ALL_MODULES.$(m).TEST_DATA)),"$(w)", )], ' \
+ '"runtime_dependencies": [$(foreach w,$(sort $(ALL_MODULES.$(m).LOCAL_RUNTIME_LIBRARIES)),"$(w)", )], ' \
'},\n' \
) | sed -e 's/, *\]/]/g' -e 's/, *\}/ }/g' -e '$$s/,$$//' >> $@
$(hide) echo '}' >> $@