Generate breakpad symbols

When BREAKPAD_GENERATE_SYMBOLS is set to true, generate breakpad
symbols for binaries.

Bug: 23900817
Change-Id: I7b992d819350f4f80df5868d16f13016502dfca0
This commit is contained in:
Steve Fung 2015-09-24 01:40:52 -07:00
parent 964f06b178
commit cb2e67fdb7
2 changed files with 21 additions and 0 deletions

View File

@ -423,6 +423,12 @@ YASM := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/yasm/yasm
DOXYGEN:= doxygen
AAPT := $(HOST_OUT_EXECUTABLES)/aapt$(HOST_EXECUTABLE_SUFFIX)
AIDL := $(HOST_OUT_EXECUTABLES)/aidl$(HOST_EXECUTABLE_SUFFIX)
ifeq ($(HOST_OS),linux)
BREAKPAD_DUMP_SYMS := $(HOST_OUT_EXECUTABLES)/dump_syms
else
# For non-supported hosts, do not generate breakpad symbols.
BREAKPAD_GENERATE_SYMBOLS := false
endif
PROTOC := $(HOST_OUT_EXECUTABLES)/aprotoc$(HOST_EXECUTABLE_SUFFIX)
DBUS_GENERATOR := $(HOST_OUT_EXECUTABLES)/dbus-binding-generator
SIGNAPK_JAR := $(HOST_OUT_JAVA_LIBRARIES)/signapk$(COMMON_JAVA_PACKAGE_SUFFIX)

View File

@ -86,6 +86,20 @@ $(symbolic_output) : $(symbolic_input) | $(ACP)
@echo "target Symbolic: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target)
###########################################################
## Store breakpad symbols
###########################################################
ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true)
my_breakpad_path := $(PRODUCT_OUT)/breakpad/$(patsubst $(PRODUCT_OUT)/%,%,$(my_module_path))
breakpad_input := $(relocation_packer_output)
breakpad_output := $(my_breakpad_path)/$(my_installed_module_stem).sym
$(breakpad_output) : $(breakpad_input) | $(BREAKPAD_DUMP_SYMS)
@echo "target breakpad: $(PRIVATE_MODULE) ($@)"
@mkdir -p $(dir $@)
$(hide) $(BREAKPAD_DUMP_SYMS) -c $< > $@
$(LOCAL_BUILT_MODULE) : $(breakpad_output)
endif
###########################################################
## Strip
@ -143,5 +157,6 @@ endif # my_strip_module
$(cleantarget): PRIVATE_CLEAN_FILES += \
$(linked_module) \
$(breakpad_output) \
$(symbolic_output) \
$(strip_output)