Merge "Enable SANITIZE_TARGET."

This commit is contained in:
Evgenii Stepanov 2015-06-19 18:15:07 +00:00 committed by Gerrit Code Review
commit d479a7a119
2 changed files with 28 additions and 13 deletions

View File

@ -9,22 +9,24 @@ ifdef LOCAL_SDK_VERSION
my_sanitize := never
endif
# Configure SANITIZE_HOST.
ifdef LOCAL_IS_HOST_MODULE
ifeq ($(my_sanitize),)
# Configure SANITIZE_HOST / SANITIZE_TARGET.
ifeq ($(my_sanitize),)
ifdef LOCAL_IS_HOST_MODULE
my_sanitize := $(strip $(SANITIZE_HOST))
else
my_sanitize := $(strip $(SANITIZE_TARGET))
endif
# SANTIZIZE_HOST=true is a deprecated way to say SANITIZE_HOST=address.
ifeq ($(my_sanitize),true)
my_sanitize := address
endif
# SANITIZE_HOST=true is a deprecated way to say SANITIZE_HOST=address.
ifeq ($(my_sanitize),true)
my_sanitize := address
endif
# SANITIZE_HOST is only in effect if the module is already using clang (host
# modules that haven't set `LOCAL_CLANG := false` and device modules that
# have set `LOCAL_CLANG := true`.
ifneq ($(my_clang),true)
my_sanitize :=
endif
# SANITIZE_HOST is only in effect if the module is already using clang (host
# modules that haven't set `LOCAL_CLANG := false` and device modules that
# have set `LOCAL_CLANG := true`.
ifneq ($(my_clang),true)
my_sanitize :=
endif
endif

View File

@ -6,6 +6,17 @@
# LOCAL_MODULE_PATH_32 and LOCAL_MODULE_PATH_64 or LOCAL_MODULE_STEM_32 and
# LOCAL_MODULE_STEM_64
my_skip_this_target :=
ifeq (address,$(strip $(SANITIZE_TARGET)))
ifeq (true,$(LOCAL_FORCE_STATIC_EXECUTABLE))
my_skip_this_target := true
else ifeq (false, $(LOCAL_CLANG))
my_skip_this_target := true
endif
endif
ifneq (true,$(my_skip_this_target))
my_prefix := TARGET_
include $(BUILD_SYSTEM)/multilib.mk
@ -71,3 +82,5 @@ LOCAL_2ND_ARCH_VAR_PREFIX :=
LOCAL_NO_2ND_ARCH_MODULE_SUFFIX :=
my_module_arch_supported :=
endif