diff options
author | Andreas Gampe <agampe@google.com> | 2016-06-20 17:36:49 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2016-06-30 16:19:53 -0700 |
commit | cd25740cba701f21a90f13fe084f2a5caf3bd596 (patch) | |
tree | 3c8ad48896242ed602e8cc66c468887a7ef75add | |
parent | ff3341b33bac9ab20427a0c7bd489f87caf8f663 (diff) | |
download | build-cd25740cba701f21a90f13fe084f2a5caf3bd596.tar.gz |
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
(cherry picked from commit 0290a416c844f9a8ec953f63f199b00d36283228)
-rw-r--r-- | core/config_sanitizers.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 26dbb7334f..62807aa8d9 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 := |