am 55309f84: am 959f0ecc: Merge "Add LOCAL_SANITIZE_RECOVER."

* commit '55309f847680c6d6f1821fb1abb59e182e229a75':
  Add LOCAL_SANITIZE_RECOVER.
This commit is contained in:
Dan Albert 2015-04-27 20:24:52 +00:00 committed by Android Git Automerger
commit ba25452fa7
2 changed files with 9 additions and 0 deletions

View File

@ -181,6 +181,7 @@ LOCAL_NATIVE_COVERAGE :=
LOCAL_DPI_VARIANTS:=
LOCAL_DPI_FILE_STEM:=
LOCAL_SANITIZE:=
LOCAL_SANITIZE_RECOVER:=
# arch specific variables
LOCAL_SRC_FILES_$(TARGET_ARCH):=

View File

@ -86,9 +86,17 @@ ifneq ($(filter address,$(my_sanitize)),)
endif
ifneq ($(filter undefined,$(my_sanitize)),)
my_cflags += -fno-sanitize-recover=all
ifdef LOCAL_IS_HOST_MODULE
my_ldlibs += -ldl
else
$(error ubsan is not yet supported on the target)
endif
endif
ifeq ($(strip $(LOCAL_SANITIZE_RECOVER)),true)
recover_arg := $(subst $(space),$(comma),$(my_sanitize)),
my_cflags += -fsanitize-recover=$(recover_arg)
endif