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

Commit cd25740c authored by Andreas Gampe's avatar Andreas Gampe
Browse files

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 0290a416)
parent ff3341b3
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,12 @@ ifneq ($(my_global_sanitize),)
  my_sanitize := $(my_global_sanitize)
  my_sanitize := $(my_global_sanitize)
endif
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.
# Don't apply sanitizers to NDK code.
ifdef LOCAL_SDK_VERSION
ifdef LOCAL_SDK_VERSION
  my_sanitize :=
  my_sanitize :=