Merge "Scudo minimal runtime support for make"
This commit is contained in:
@@ -212,10 +212,6 @@ ifneq ($(filter address thread hwaddress,$(my_sanitize)),)
|
|||||||
my_sanitize := $(filter-out scudo,$(my_sanitize))
|
my_sanitize := $(filter-out scudo,$(my_sanitize))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter scudo,$(my_sanitize)),)
|
|
||||||
my_shared_libraries += $($(LOCAL_2ND_ARCH_VAR_PREFIX)SCUDO_RUNTIME_LIBRARY)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Undefined symbols can occur if a non-sanitized library links
|
# Undefined symbols can occur if a non-sanitized library links
|
||||||
# sanitized static libraries. That's OK, because the executable
|
# sanitized static libraries. That's OK, because the executable
|
||||||
# always depends on the ASan runtime library, which defines these
|
# always depends on the ASan runtime library, which defines these
|
||||||
@@ -375,7 +371,7 @@ ifeq ($(LOCAL_IS_HOST_MODULE)$(LOCAL_IS_AUX_MODULE),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifneq ($(filter unsigned-integer-overflow signed-integer-overflow integer,$(my_sanitize)),)
|
ifneq ($(filter unsigned-integer-overflow signed-integer-overflow integer,$(my_sanitize)),)
|
||||||
ifeq ($(filter unsigned-integer-overflow signed-integer overflow integer,$(my_sanitize_diag)),)
|
ifeq ($(filter unsigned-integer-overflow signed-integer-overflow integer,$(my_sanitize_diag)),)
|
||||||
ifeq ($(filter cfi,$(my_sanitize_diag)),)
|
ifeq ($(filter cfi,$(my_sanitize_diag)),)
|
||||||
ifeq ($(filter address hwaddress,$(my_sanitize)),)
|
ifeq ($(filter address hwaddress,$(my_sanitize)),)
|
||||||
my_cflags += -fsanitize-minimal-runtime
|
my_cflags += -fsanitize-minimal-runtime
|
||||||
@@ -387,6 +383,18 @@ ifeq ($(LOCAL_IS_HOST_MODULE)$(LOCAL_IS_AUX_MODULE),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# For Scudo, we opt for the minimal runtime, unless some diagnostics are enabled.
|
||||||
|
ifneq ($(filter scudo,$(my_sanitize)),)
|
||||||
|
ifeq ($(filter unsigned-integer-overflow signed-integer-overflow integer cfi,$(my_sanitize_diag)),)
|
||||||
|
my_cflags += -fsanitize-minimal-runtime
|
||||||
|
endif
|
||||||
|
ifneq ($(filter -fsanitize-minimal-runtime,$(my_cflags)),)
|
||||||
|
my_shared_libraries += $($(LOCAL_2ND_ARCH_VAR_PREFIX)SCUDO_MINIMAL_RUNTIME_LIBRARY)
|
||||||
|
else
|
||||||
|
my_shared_libraries += $($(LOCAL_2ND_ARCH_VAR_PREFIX)SCUDO_RUNTIME_LIBRARY)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(LOCAL_SANITIZE_RECOVER)),)
|
ifneq ($(strip $(LOCAL_SANITIZE_RECOVER)),)
|
||||||
recover_arg := $(subst $(space),$(comma),$(LOCAL_SANITIZE_RECOVER)),
|
recover_arg := $(subst $(space),$(comma),$(LOCAL_SANITIZE_RECOVER)),
|
||||||
my_cflags += -fsanitize-recover=$(recover_arg)
|
my_cflags += -fsanitize-recover=$(recover_arg)
|
||||||
|
Reference in New Issue
Block a user