Build: Add option to restrict sanitization by owner
Add Make variable SANITIZE_NEVER_BY_OWNER to selectively
sanitize modules. By default, both are being sanitized. The
value of the variable is interpreted as a space or colon
separated list of owner names.
This can be used to create builds that lower the sanitization
burden by not sanitizing parts of the platform.
Bug: 29498013
Change-Id: Ib4412657fd38ff28a5c0863eddc2acde63c88ebb
(cherry picked from commit ea38d8e95d
)
This commit is contained in:
@@ -30,6 +30,17 @@ ifeq ($(filter $(SANITIZE_ARCH),$(my_32_64_bit_suffix)),)
|
||||
my_sanitize :=
|
||||
endif
|
||||
|
||||
# Add a filter point based on module owner (to lighten the burden). The format is a space- or
|
||||
# colon-separated list of owner names.
|
||||
ifneq (,$(SANITIZE_NEVER_BY_OWNER))
|
||||
ifneq (,$(LOCAL_MODULE_OWNER))
|
||||
ifneq (,$(filter $(LOCAL_MODULE_OWNER),$(subst :, ,$(SANITIZE_NEVER_BY_OWNER))))
|
||||
$(warning Not sanitizing $(LOCAL_MODULE) based on module owner.)
|
||||
my_sanitize :=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Don't apply sanitizers to NDK code.
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
my_sanitize :=
|
||||
|
Reference in New Issue
Block a user