diff options
author | Dan Albert <danalbert@google.com> | 2015-03-31 15:18:17 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-03-31 18:29:23 -0700 |
commit | 5036729c41829c335260c7c803ea9128079cdef8 (patch) | |
tree | 05a1b30579386254ad5f0e923c30ebfa205d52b6 /core/cxx_stl_setup.mk | |
parent | 91f713a1683a6f3663326167edf4d82c524dedcb (diff) | |
download | build-5036729c41829c335260c7c803ea9128079cdef8.zip build-5036729c41829c335260c7c803ea9128079cdef8.tar.gz build-5036729c41829c335260c7c803ea9128079cdef8.tar.bz2 |
Add unwinder linking to STL setup.
Previously we were bundling this into libc++ and having each binary
resolve its symbols from there. This means that the unwinder that gets
used for a given binary is sensitive to the order in which its
libraries are linked. Making this a static library dependency of each
binary means the right unwinder will always be used.
Bug: 18471342
Bug: 19958712
Change-Id: I782d212784dbf85355b5d9146d7460d675259a0e
Diffstat (limited to 'core/cxx_stl_setup.mk')
-rw-r--r-- | core/cxx_stl_setup.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/cxx_stl_setup.mk b/core/cxx_stl_setup.mk index 63e2069..7961801 100644 --- a/core/cxx_stl_setup.mk +++ b/core/cxx_stl_setup.mk @@ -65,6 +65,18 @@ ifneq ($(filter $(my_cxx_stl),libc++ libc++_static),) my_ldflags += -nodefaultlibs my_ldlibs += -lpthread -lm my_ldlibs += $($(my_prefix)$(HOST_OS)_$(my_link_type)_gcclibs) + else + ifeq (arm,$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) + my_static_libraries += libunwind_llvm + else + my_static_libraries += libunwindbacktrace + endif + + ifeq ($(my_link_type),static) + my_static_libraries += libdl + else + my_shared_libraries += libdl + endif endif else ifneq ($(filter $(my_cxx_stl),stlport stlport_static),) ifndef LOCAL_IS_HOST_MODULE |