summaryrefslogtreecommitdiffstats
path: root/core/binary.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/binary.mk')
-rw-r--r--core/binary.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/binary.mk b/core/binary.mk
index c136a00..18f67fe 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -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)