Josh Gao | cbe70cb | 2016-10-18 18:17:52 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | crasher_cppflags := \ |
| 4 | -std=gnu++14 \ |
| 5 | -W \ |
| 6 | -Wall \ |
| 7 | -Wextra \ |
| 8 | -Wunused \ |
| 9 | -Werror \ |
| 10 | -O0 \ |
| 11 | -fstack-protector-all \ |
| 12 | -Wno-free-nonheap-object \ |
| 13 | -Wno-date-time |
| 14 | |
| 15 | include $(CLEAR_VARS) |
| 16 | LOCAL_SRC_FILES := crasher.cpp |
| 17 | LOCAL_SRC_FILES_arm := arm/crashglue.S |
| 18 | LOCAL_SRC_FILES_arm64 := arm64/crashglue.S |
| 19 | LOCAL_SRC_FILES_mips := mips/crashglue.S |
| 20 | LOCAL_SRC_FILES_mips64 := mips64/crashglue.S |
| 21 | LOCAL_SRC_FILES_x86 := x86/crashglue.S |
| 22 | LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S |
| 23 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
| 24 | LOCAL_MODULE_TAGS := optional |
| 25 | LOCAL_CPPFLAGS := $(crasher_cppflags) |
| 26 | LOCAL_SHARED_LIBRARIES := libbase liblog |
| 27 | |
| 28 | # The arm emulator has VFP but not VFPv3-D32. |
| 29 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 30 | LOCAL_ASFLAGS_arm += -DHAS_VFP_D32 |
| 31 | endif |
| 32 | |
| 33 | LOCAL_MODULE := crasher |
| 34 | LOCAL_MODULE_STEM_32 := crasher |
| 35 | LOCAL_MODULE_STEM_64 := crasher64 |
| 36 | LOCAL_MULTILIB := both |
| 37 | |
| 38 | include $(BUILD_EXECUTABLE) |
| 39 | |
| 40 | include $(CLEAR_VARS) |
| 41 | LOCAL_SRC_FILES := crasher.cpp |
| 42 | LOCAL_SRC_FILES_arm := arm/crashglue.S |
| 43 | LOCAL_SRC_FILES_arm64 := arm64/crashglue.S |
| 44 | LOCAL_SRC_FILES_mips := mips/crashglue.S |
| 45 | LOCAL_SRC_FILES_mips64 := mips64/crashglue.S |
| 46 | LOCAL_SRC_FILES_x86 := x86/crashglue.S |
| 47 | LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S |
| 48 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
| 49 | LOCAL_MODULE_TAGS := optional |
| 50 | LOCAL_CPPFLAGS := $(crasher_cppflags) -DSTATIC_CRASHER |
| 51 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 52 | LOCAL_SHARED_LIBRARIES := libbase liblog |
| 53 | |
| 54 | # The arm emulator has VFP but not VFPv3-D32. |
| 55 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 56 | LOCAL_ASFLAGS_arm += -DHAS_VFP_D32 |
| 57 | endif |
| 58 | |
| 59 | LOCAL_MODULE := static_crasher |
| 60 | LOCAL_MODULE_STEM_32 := static_crasher |
| 61 | LOCAL_MODULE_STEM_64 := static_crasher64 |
| 62 | LOCAL_MULTILIB := both |
| 63 | |
| 64 | LOCAL_STATIC_LIBRARIES := libdebuggerd_handler libbase liblog |
| 65 | |
| 66 | include $(BUILD_EXECUTABLE) |