Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e84420c3 authored by Ying Wang's avatar Ying Wang Committed by Android (Google) Code Review
Browse files

Merge "Untwist the target/host shared library dependencies."

parents bc0efad1 9485a57b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -102,14 +102,20 @@ else
  installed_shared_library_module_names := \
      $(LOCAL_SYSTEM_SHARED_LIBRARIES) $(LOCAL_SHARED_LIBRARIES)
endif
# The real dependency will be added after all Android.mks are loaded and the install paths
# of the shared libraries are determined.
LOCAL_REQUIRED_MODULES += $(installed_shared_library_module_names)
installed_shared_library_module_names := $(sort $(installed_shared_library_module_names))

#######################################
include $(BUILD_SYSTEM)/base_rules.mk
#######################################

# The real dependency will be added after all Android.mks are loaded and the install paths
# of the shared libraries are determined.
ifdef LOCAL_INSTALLED_MODULE
ifdef installed_shared_library_module_names
$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(installed_shared_library_module_names))
endif
endif

ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true)
  LOCAL_CLANG := true
  LOCAL_CFLAGS += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS)
+5 −0
Original line number Diff line number Diff line
@@ -81,6 +81,11 @@ ALL_FINDBUGS_FILES:=
# GPL module license files
ALL_GPL_MODULE_LICENSE_FILES:=

# Target and host installed module's dependencies on shared libraries.
# They are list of "<installed_file>:lib1,lib2...".
TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES :=
HOST_DEPENDENCIES_ON_SHARED_LIBRARIES :=

# Generated class file names for Android resource.
# They are escaped and quoted so can be passed safely to a bash command.
ANDROID_RESOURCE_GENERATED_CLASSES := 'R.class' 'R$$*.class' 'Manifest.class' 'Manifest$$*.class'
+15 −2
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ CUSTOM_MODULES := \
# BUG: the system image won't know to depend on modules that are
# brought in as requirements of other modules.
define add-required-deps
$(1): $(2)
$(1): | $(2)
endef
$(foreach m,$(ALL_MODULES), \
  $(eval r := $(ALL_MODULES.$(m).REQUIRED)) \
@@ -542,9 +542,22 @@ $(foreach m,$(ALL_MODULES), \
    $(eval $(call add-required-deps,$(ALL_MODULES.$(m).INSTALLED),$(r))) \
   ) \
 )

# Resolve the dependencies on shared libraries.
$(foreach m,$(TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES), \
  $(eval p := $(subst :,$(space),$(m))) \
  $(eval r := $(filter $(TARGET_OUT_ROOT)/%,$(call module-installed-files,\
    $(subst $(comma),$(space),$(lastword $(p)))))) \
  $(eval $(call add-required-deps,$(firstword $(p)),$(r))))
$(foreach m,$(HOST_DEPENDENCIES_ON_SHARED_LIBRARIES), \
  $(eval p := $(subst :,$(space),$(m))) \
  $(eval r := $(filter $(HOST_OUT_ROOT)/%,$(call module-installed-files,\
    $(subst $(comma),$(space),$(lastword $(p)))))) \
  $(eval $(call add-required-deps,$(firstword $(p)),$(r))))

m :=
r :=
i :=
p :=
add-required-deps :=

# -------------------------------------------------------------------