am 5d8029f2
: Update ASan configuration.
* commit '5d8029f234669cf1688739437810db11dcdb403d': Update ASan configuration.
This commit is contained in:
commit
7b1bcd8a1d
2 changed files with 5 additions and 2 deletions
|
@ -133,6 +133,8 @@ endif
|
|||
|
||||
ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true)
|
||||
LOCAL_CLANG := true
|
||||
# Frame pointer based unwinder in ASan requires ARM frame setup.
|
||||
LOCAL_ARM_MODE := arm
|
||||
my_cflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS)
|
||||
my_ldflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS)
|
||||
my_shared_libraries += $(ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES)
|
||||
|
|
|
@ -67,9 +67,10 @@ CLANG_CONFIG_EXTRA_HOST_C_INCLUDES := $(LLVM_PREBUILTS_HEADER_PATH)
|
|||
CLANG_CONFIG_EXTRA_TARGET_C_INCLUDES := $(LLVM_PREBUILTS_HEADER_PATH) $(TARGET_OUT_HEADERS)/clang
|
||||
|
||||
# Address sanitizer clang config
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address
|
||||
ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan_$(TARGET_ARCH)_android
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address -fno-omit-frame-pointer
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl libasan_preload
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl $(ADDRESS_SANITIZER_RUNTIME_LIBRARY)
|
||||
ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
|
||||
|
||||
# This allows us to use the superset of functionality that compiler-rt
|
||||
|
|
Loading…
Reference in a new issue