aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-06-06 18:05:53 -0700
committerYing Wang <wangying@google.com>2013-07-31 20:00:45 -0700
commit16b92edc386a4616b813af392ba54ad9e2c05ca7 (patch)
tree6df3d9d4f7e640c58eb04cc9268ba2cec17d2e3f
parent94de1eba0e87297421789b339c5f26bf3e48eeb1 (diff)
downloadbuild-16b92edc386a4616b813af392ba54ad9e2c05ca7.tar.gz
Remove unnecessary dependencies between host and target modules.
With this change, modules introduced by LOCAL_REQUIRED_MODULES will be split by host/target: target modules only depend on target modules and host modules only depend on host modules. Bug: 9303948 Change-Id: I4078a7983aa3c00e99534f3f170dfe4b66b12287
-rw-r--r--core/main.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/main.mk b/core/main.mk
index 3a432de0d5..282d9c3f21 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -547,10 +547,20 @@ $(foreach m,$(ALL_MODULES), \
$(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
$(if $(r), \
$(eval r := $(call module-installed-files,$(r))) \
- $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \
+ $(eval t_m := $(filter $(TARGET_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+ $(eval h_m := $(filter $(HOST_OUT_ROOT)/%, $(ALL_MODULES.$(m).INSTALLED))) \
+ $(eval t_r := $(filter $(TARGET_OUT_ROOT)/%, $(r))) \
+ $(eval h_r := $(filter $(HOST_OUT_ROOT)/%, $(r))) \
+ $(if $(t_m), $(eval $(call add-required-deps, $(t_m),$(t_r)))) \
+ $(if $(h_m), $(eval $(call add-required-deps, $(h_m),$(h_r)))) \
) \
)
+t_m :=
+h_m :=
+t_r :=
+h_r :=
+
# Resolve the dependencies on shared libraries.
$(foreach m,$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES), \
$(eval p := $(subst :,$(space),$(m))) \