From 802f2116ed43ed36721b2d623d114ffa1b1268ed Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 15 Nov 2021 13:15:22 -0800 Subject: [PATCH] Translate BUILT_INSTALLED to LOCAL_BUILT_MODULE Soong creates install rules and lists them in LOCAL_SOONG_INSTALL_PAIRS, where they get copied to ALL_MODULE.$(m).BUILT_INSTALLED. BUILT_INSTALLED is used by package-modules.mk to copy the built modules to alternate install locations for building zips like continuous_native_tests.zip. Translate Soong's built module location, which is listed in LOCAL_PREBUILT_MODULE_FILE, into $(LOCAL_BUILT_MODULE) when setting BUILT_INSTALLED so that package-modules.mk copies from $(LOCAL_BUILT_MODULE) instead of $(LOCAL_PREBUILT_MODULE_FILE). This ensures that the transitive dependencies added to $(LOCAL_BUILT_MODULE), for example the unstripped symbols files, are present when continuous_native_tests.zip is built. Bug: 206137439 Test: manual Change-Id: I1a45cd6d3c81d6435a10f4d29557e521753068a4 --- core/base_rules.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 02b424d6b7..134cb8fffb 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -932,9 +932,13 @@ ifneq (,$(LOCAL_SOONG_INSTALLED_MODULE)) # of files provided by this module. Used by custom packaging rules like # package-modules.mk that need to copy the built files to a custom install # location during packaging. + # + # Translate copies from $(LOCAL_PREBUILT_MODULE_FILE) to $(LOCAL_BUILT_MODULE) + # so that package-modules.mk gets any transtive dependencies added to + # $(LOCAL_BUILT_MODULE), for example unstripped symbols files. ALL_MODULES.$(my_register_name).BUILT_INSTALLED := \ $(strip $(ALL_MODULES.$(my_register_name).BUILT_INSTALLED) \ - $(LOCAL_SOONG_INSTALL_PAIRS) \ + $(patsubst $(LOCAL_PREBUILT_MODULE_FILE):%,$(LOCAL_BUILT_MODULE):%,$(LOCAL_SOONG_INSTALL_PAIRS)) \ $(my_init_rc_pairs) \ $(my_test_data_pairs) \ $(my_vintf_pairs))