summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-11-14 11:06:08 -0800
committer Colin Cross <ccross@android.com> 2023-11-16 11:46:40 -0800
commit9cb51b74467d0fb932e93c30bc89af01eb879c18 (patch)
treebdbcad2b69b67a37c163bdb9b0047dcb01e55452
parent93e1e702a4f737129fcf190f6366cecd4b79e6b0 (diff)
Store ALL_DEPS under my_register_name
ALL_DEPS was original stored in ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS for use by the old licensing code. That has been removed, and it is now only used by module-info.json. Storing it with $(LOCAL_MODULE) causes _32 entries in module-info.json to be missing dependencies, and causes the dependencies from _32 variants to be squashed into the normal variants. Replace ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS with ALL_MODULES.$(my_register_name).ALL_DEPS. Test: builds Change-Id: Ieddfcddd8547b61bd938ae051beb738268aac5af
-rw-r--r--core/base_rules.mk7
-rw-r--r--core/java_common.mk2
-rw-r--r--core/tasks/module-info.mk2
3 files changed, 5 insertions, 6 deletions
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 8f14f7a5f0..8236dc9ddd 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -1156,10 +1156,9 @@ INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(my_register_name)
##########################################################
# Track module-level dependencies.
-# Use $(LOCAL_MODULE) instead of $(my_register_name) to ignore module's bitness.
# (b/204397180) Unlock RECORD_ALL_DEPS was acknowledged reasonable for better Atest performance.
-ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS := $(sort \
- $(ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS) \
+ALL_MODULES.$(my_register_name).ALL_DEPS := \
+ $(ALL_MODULES.$(my_register_name).ALL_DEPS) \
$(LOCAL_STATIC_LIBRARIES) \
$(LOCAL_WHOLE_STATIC_LIBRARIES) \
$(LOCAL_SHARED_LIBRARIES) \
@@ -1169,7 +1168,7 @@ ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS := $(sort \
$(LOCAL_HEADER_LIBRARIES) \
$(LOCAL_STATIC_JAVA_LIBRARIES) \
$(LOCAL_JAVA_LIBRARIES) \
- $(LOCAL_JNI_SHARED_LIBRARIES))
+ $(LOCAL_JNI_SHARED_LIBRARIES)
###########################################################
## umbrella targets used to verify builds
diff --git a/core/java_common.mk b/core/java_common.mk
index ec047185f4..c1ccd1ac29 100644
--- a/core/java_common.mk
+++ b/core/java_common.mk
@@ -386,7 +386,7 @@ else # LOCAL_IS_HOST_MODULE
endif # !LOCAL_IS_HOST_MODULE
# (b/204397180) Record ALL_DEPS by default.
-ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS := $(ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS) $(full_java_bootclasspath_libs)
+ALL_MODULES.$(my_register_name).ALL_DEPS := $(ALL_MODULES.$(my_register_name).ALL_DEPS) $(full_java_bootclasspath_libs)
# Export the SDK libs. The sdk library names listed in LOCAL_SDK_LIBRARIES are first exported.
# Then sdk library names exported from dependencies are all re-exported.
diff --git a/core/tasks/module-info.mk b/core/tasks/module-info.mk
index 9668b539af..8e2d58e34b 100644
--- a/core/tasks/module-info.mk
+++ b/core/tasks/module-info.mk
@@ -18,7 +18,7 @@ $(MODULE_INFO_JSON):
'"auto_test_config": [$(ALL_MODULES.$(m).auto_test_config)],' \
'"module_name": "$(ALL_MODULES.$(m).MODULE_NAME)"$(COMMA)' \
'"test_config": [$(KATI_foreach_sep w,$(COMMA) ,$(strip $(ALL_MODULES.$(m).TEST_CONFIG) $(ALL_MODULES.$(m).EXTRA_TEST_CONFIGS)),"$(w)")],' \
- '"dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_DEPS.$(m).ALL_DEPS)),"$(w)")],' \
+ '"dependencies": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).ALL_DEPS)),"$(w)")],' \
'"shared_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SHARED_LIBS)),"$(w)")],' \
'"static_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).STATIC_LIBS)),"$(w)")],' \
'"system_shared_libs": [$(KATI_foreach_sep w,$(COMMA) ,$(sort $(ALL_MODULES.$(m).SYSTEM_SHARED_LIBS)),"$(w)")],' \