From 57e75d103beaeedcbd854d04456063ded0ed0212 Mon Sep 17 00:00:00 2001 From: Erwin Jansen Date: Mon, 26 Feb 2018 17:47:20 -0800 Subject: Enable static ASAN from clang - We now use the sanitizer shipped with clang. - Note: Running with the sanitizer enabled might not always work or behave as expected. This change merely enables the sanitizer, it doesn't fix any failures. Change-Id: Ib58171129ab96c3073402ae22e6af1074ab7bb98 Test: ASAN_SYMBOLIZER_PATH=$PWD/../../prebuilts/clang/host/linux-x86/clang-4053586/bin/llvm-symbolizer ./objs/android_emu64_unittests --- host/commands/emugen/Android.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host') diff --git a/host/commands/emugen/Android.mk b/host/commands/emugen/Android.mk index 777f124ee..d3e551d45 100644 --- a/host/commands/emugen/Android.mk +++ b/host/commands/emugen/Android.mk @@ -19,6 +19,10 @@ ifeq ($(BUILD_HOST_OS),linux) LOCAL_LDFLAGS +=-Wl,-rpath=$(BUILD_OBJS_DIR)/intermediates64 endif +ifneq (,$(BUILD_SANITIZER)) + LOCAL_LDFLAGS += -lclang_rt.asan-x86_64 -ldl +endif + LOCAL_INSTALL := false $(call emugl-end-module) -- cgit v1.2.3