Do not use UBSAN library on HOST or AUX targets

AUX modules are not necessarily using the same toolchain
as the TARGET modules. they don't have to depend on
this library.

Change-Id: Ib50cf0eb26c257ae3eb69a43aa1a12c41d5d39b0
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
This commit is contained in:
Alexey Polyudov
2018-03-27 15:28:12 -07:00
parent c209fb1799
commit e98e5625ad

View File

@@ -324,8 +324,8 @@ ifneq ($(filter address,$(my_sanitize)),)
endif endif
endif endif
# Use minimal diagnostics when integer overflow is enabled # Use minimal diagnostics when integer overflow is enabled; never do it for HOST or AUX modules
ifndef LOCAL_IS_HOST_MODULE ifeq ($(LOCAL_IS_HOST_MODULE)$(LOCAL_IS_AUX_MODULE),)
# Pre-emptively add UBSAN minimal runtime incase a static library dependency requires it # Pre-emptively add UBSAN minimal runtime incase a static library dependency requires it
ifeq ($(filter STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)),) ifeq ($(filter STATIC_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
ifndef LOCAL_SDK_VERSION ifndef LOCAL_SDK_VERSION