summaryrefslogtreecommitdiffstats
path: root/libbacktrace
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-09-22 21:57:43 -0700
committerYabin Cui <yabinc@google.com>2015-09-22 22:07:21 -0700
commit9e1dd67de4bba540a94369ccace0deaf38368bc0 (patch)
tree56294236e33b8510d0c4b7785568ee327b02e5b0 /libbacktrace
parent2bd33b3c2a498650c773db2f6ebaffabc0783cd8 (diff)
downloadcore-9e1dd67de4bba540a94369ccace0deaf38368bc0.tar.gz
core-9e1dd67de4bba540a94369ccace0deaf38368bc0.tar.bz2
core-9e1dd67de4bba540a94369ccace0deaf38368bc0.zip
libbacktrace: enable -fno-omit-frame-pointer for host build.
This change makes sure -fno-omit-frame-pointer flag is not overrided by flags set in $(LLVM_HOST_BUILD_MK). Change-Id: I53037b0eab6bd1272cec0f5c9caa058ad1a55419
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/Android.build.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbacktrace/Android.build.mk b/libbacktrace/Android.build.mk
index 8e63dab57..84d07f23f 100644
--- a/libbacktrace/Android.build.mk
+++ b/libbacktrace/Android.build.mk
@@ -79,8 +79,13 @@ endif
ifeq ($(build_type),host)
# Only build if host builds are supported.
ifeq ($(build_host),true)
- LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer
include $(LLVM_HOST_BUILD_MK)
+ # -fno-omit-frame-pointer should be set for host build. Because currently
+ # libunwind can't recognize .debug_frame using dwarf version 4, and it relies
+ # on stack frame pointer to do unwinding on x86.
+ # $(LLVM_HOST_BUILD_MK) overwrites -fno-omit-frame-pointer. so the below line
+ # must be after the include.
+ LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer
include $(BUILD_HOST_$(build_target))
endif
endif