From 55f73e6c43312e92ca8cd543099d27a4420a5b30 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Thu, 12 May 2016 13:07:36 -0700 Subject: [PATCH] Only add libdl dependency for ASan/TSan on target. Only sanitizers that intercept stuff need that. For example, SafeStack does not, and I think UBSan too. Bug: 27729263 Change-Id: I413cd46cc6c6914a363a3c53da7954beacd8f0d8 --- core/config_sanitizers.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 26dbb7334..6b18be516 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -101,7 +101,9 @@ ifneq ($(my_sanitize),) my_cflags += -fsanitize-trap=all my_cflags += -ftrap-function=abort endif - my_shared_libraries += libdl + ifneq ($(filter address thread,$(my_sanitize)),) + my_shared_libraries += libdl + endif endif endif -- 2.11.0