Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42823661 authored by Evgenii Stepanov's avatar Evgenii Stepanov
Browse files

Add LOCAL_NOSANITIZE.

This can be used to selectively disable individual sanitizers on a
target. For example, some parts of libc should be built with
SafeStack (when requested with SANITIZE_TARGET), but never with
AddressSanitizer. Current build rules specify LOCAL_SANITIZE := never
to disable AddressSanitizer; the idea is to change that to
LOCAL_NOSANITIZE := address thread.

Bug: 27729263
Change-Id: I2b770f2ce3faf6ad6798792327e96adb86fe4a4f
parent 55d4a46f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ LOCAL_DPI_VARIANTS:=
LOCAL_DPI_FILE_STEM:=
LOCAL_SANITIZE:=
LOCAL_SANITIZE_RECOVER:=
LOCAL_NOSANITIZE:=
LOCAL_DBUS_PROXY_PREFIX:=
LOCAL_INIT_RC:=
LOCAL_MODULE_HOST_OS:=
+5 −0
Original line number Diff line number Diff line
@@ -34,6 +34,11 @@ ifeq ($(LOCAL_SANITIZE),never)
  my_sanitize :=
endif

my_nosanitize = $(strip $(LOCAL_NOSANITIZE))
ifneq ($(my_nosanitize),)
  my_sanitize := $(filter-out $(my_nosanitize),$(my_sanitize))
endif

# TSAN is not supported on 32-bit architectures. For non-multilib cases, make
# its use an error. For multilib cases, don't use it for the 32-bit case.
ifneq ($(filter thread,$(my_sanitize)),)