summaryrefslogtreecommitdiffstats
path: root/core/clang
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-10-20 11:37:18 -0700
committerDan Albert <danalbert@google.com>2014-10-20 11:37:18 -0700
commit2daceaa83c7f49b2bfeb40372123778714925098 (patch)
tree8c6f15ac3dccc7962acbb5086e48360b3b75b0bc /core/clang
parent28c2d3b9852550bc9ae150e2725e08885f1ade73 (diff)
downloadbuild-2daceaa83c7f49b2bfeb40372123778714925098.zip
build-2daceaa83c7f49b2bfeb40372123778714925098.tar.gz
build-2daceaa83c7f49b2bfeb40372123778714925098.tar.bz2
Add support for ASAN in host modules.
Change-Id: Id9ed83499e0eb995f06e845c3153a50677d768b8
Diffstat (limited to 'core/clang')
-rw-r--r--core/clang/config.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk
index bdd18d8..246690f 100644
--- a/core/clang/config.mk
+++ b/core/clang/config.mk
@@ -92,8 +92,14 @@ endif
# Address sanitizer clang config
ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address
ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit
-ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES := libdl libasan_preload
-ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES := libasan
+
+ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_HOST := -lpthread -ldl
+ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_HOST :=
+ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_HOST := libasan
+
+ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_TARGET :=
+ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_TARGET := libdl libasan_preload
+ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_TARGET := libasan
# This allows us to use the superset of functionality that compiler-rt
# provides to Clang (for supporting features like -ftrapv).