Always link libdl with libc++ for the NDK.

libc++ requires libdl whether it's statically linked or not.

Test: make checkbuild tests
Bug: None
Change-Id: I8abdcfaef779b358196716ab1193cebe278317ac
This commit is contained in:
Dan Albert 2016-09-14 16:08:04 -07:00
parent 029ced528b
commit 2936a1e84b
1 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,6 @@ ifdef LOCAL_SDK_VERSION
ifneq (,$(filter r10 r11,$(LOCAL_NDK_VERSION))) ifneq (,$(filter r10 r11,$(LOCAL_NDK_VERSION)))
ifeq (c++_static,$(LOCAL_NDK_STL_VARIANT)) ifeq (c++_static,$(LOCAL_NDK_STL_VARIANT))
my_ndk_stl_static_lib := $(my_libcxx_libdir)/libc++_static.a my_ndk_stl_static_lib := $(my_libcxx_libdir)/libc++_static.a
my_ldlibs += -ldl
else else
my_ndk_stl_shared_lib_fullpath := $(my_libcxx_libdir)/libc++_shared.so my_ndk_stl_shared_lib_fullpath := $(my_libcxx_libdir)/libc++_shared.so
endif endif
@ -225,7 +224,6 @@ ifdef LOCAL_SDK_VERSION
my_ndk_stl_static_lib := \ my_ndk_stl_static_lib := \
$(my_libcxx_libdir)/libc++_static.a \ $(my_libcxx_libdir)/libc++_static.a \
$(my_libcxx_libdir)/libc++abi.a $(my_libcxx_libdir)/libc++abi.a
my_ldlibs += -ldl
else else
my_ndk_stl_shared_lib_fullpath := $(my_libcxx_libdir)/libc++_shared.so my_ndk_stl_shared_lib_fullpath := $(my_libcxx_libdir)/libc++_shared.so
endif endif
@ -236,6 +234,8 @@ ifdef LOCAL_SDK_VERSION
endif endif
endif endif
my_ldlibs += -ldl
my_ndk_stl_cppflags := -std=c++11 my_ndk_stl_cppflags := -std=c++11
else # LOCAL_NDK_STL_VARIANT is not c++_* either else # LOCAL_NDK_STL_VARIANT is not c++_* either
ifneq (,$(filter gnustl_%, $(LOCAL_NDK_STL_VARIANT))) ifneq (,$(filter gnustl_%, $(LOCAL_NDK_STL_VARIANT)))