summaryrefslogtreecommitdiffstats
path: root/core/clang
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugenis@google.com>2014-02-21 18:10:53 +0400
committerEvgeniy Stepanov <eugenis@google.com>2014-04-16 10:52:10 +0000
commit5d8029f234669cf1688739437810db11dcdb403d (patch)
tree6c0e3e09ec99871621f42296baab52ee75d52aad /core/clang
parent105ed03cf01f2ece0aca279d4d53151b4fd4784e (diff)
downloadbuild-5d8029f234669cf1688739437810db11dcdb403d.zip
build-5d8029f234669cf1688739437810db11dcdb403d.tar.gz
build-5d8029f234669cf1688739437810db11dcdb403d.tar.bz2
Update ASan configuration.
Change runtime library name to keep in sync with upstream. Enable frame pointers in instrumented code for fast stack unwind. Change-Id: I815912bb856c56c399639ea76ad4cb6b97961840
Diffstat (limited to 'core/clang')
-rw-r--r--core/clang/config.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk
index c471f7e..94dcdb0 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -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