aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2013-07-12 22:05:14 -0700
committerYing Wang <wangying@google.com>2013-07-13 05:31:11 +0000
commitba9636d47fdc91c4caca6c9e0ad618956ddbb98b (patch)
tree49d2a1bdbb99f4e9f4819b77926615e1542b6c44
parenta3d60ae86f112388c27b4a164f269efd5f6d1c72 (diff)
downloadbuild-ba9636d47fdc91c4caca6c9e0ad618956ddbb98b.tar.gz
Establish the built module dependencies on prebuilt shared library
This is needed because the linker command line uses -rpath-link with built module path ($(*_OUT_INTERMEDIATE_LIBRARIES)) to search for indirect dependency libraries. Change-Id: I21d537c7c697dfb18df25d3d2bb7bffe2f9d370f (cherry picked from commit ada8f296570e0bda93b433a7aa86ad138dd1705e)
-rw-r--r--core/prebuilt.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 6e088327c0..f5732d1b08 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -84,6 +84,14 @@ endif # prebuilt_module_is_a_library
ifdef LOCAL_INSTALLED_MODULE
ifdef LOCAL_SHARED_LIBRARIES
$(my_prefix)DEPENDENCIES_ON_SHARED_LIBRARIES += $(LOCAL_MODULE):$(LOCAL_INSTALLED_MODULE):$(subst $(space),$(comma),$(LOCAL_SHARED_LIBRARIES))
+
+# We also need the LOCAL_BUILT_MODULE dependency,
+# since we use -rpath-link which points to the built module's path.
+built_shared_libraries := \
+ $(addprefix $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)/, \
+ $(addsuffix $(so_suffix), \
+ $(LOCAL_SHARED_LIBRARIES)))
+$(LOCAL_BUILT_MODULE) : $(built_shared_libraries)
endif
endif