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
This commit is contained in:
Evgenii Stepanov
2016-05-12 13:07:36 -07:00
parent ff3341b33b
commit 55f73e6c43

View File

@@ -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