From: Andreas Gampe Date: Tue, 21 Jun 2016 00:36:49 +0000 (-0700) Subject: Build: Add option to restrict sanitization by architecture X-Git-Tag: android-x86-7.1-r1~201^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0290a416c844f9a8ec953f63f199b00d36283228;p=android-x86%2Fbuild.git Build: Add option to restrict sanitization by architecture Add Make variable SANITIZE_ARCH to selectively sanitize binaries. This uses the "bitness," i.e., 32 or 64, to potentially filter the sanitization. By default, both are being sanitized. This can be used to create builds that lower the sanitization burden by not sanitizing "half" of the platform. Bug: 29498013 Change-Id: I73e6d479f08a970ba912f4f63967d32f3487125f --- diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 6e968808c..524a065e2 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -24,6 +24,12 @@ ifneq ($(my_global_sanitize),) my_sanitize := $(my_global_sanitize) endif +# Add a filter point for 32-bit vs 64-bit sanitization (to lighten the burden). +SANITIZE_ARCH ?= 32 64 +ifeq ($(filter $(SANITIZE_ARCH),$(my_32_64_bit_suffix)),) + my_sanitize := +endif + # Don't apply sanitizers to NDK code. ifdef LOCAL_SDK_VERSION my_sanitize :=