Support sanitizing a single device arch

Allow specifying one or more architectures to sanitize for.  Defaults to
sanitizing all architectures.  Allows reducing the cost of sanitization
by only sanitizing half of the platform.

Bug: 29498013
Test: No change to build.ninja files with m -j SANITIZE_TARGET=address
Test: m -j SANITIZE_TARGET=address SANITIZE_TARGET_ARCH=arm
Test: nm -D $OUT/system/bin/app_process64 | grep asan, no asan symbols found
Change-Id: I972cccc2f19443895d47b44bd8104105f93ffb7d
This commit is contained in:
Colin Cross
2016-11-02 14:34:39 -07:00
parent 9194d8076c
commit 23ae82a2b2
3 changed files with 13 additions and 11 deletions

View File

@@ -118,8 +118,9 @@ type productVariables struct {
DevicePrefer32BitExecutables *bool `json:",omitempty"`
HostPrefer32BitExecutables *bool `json:",omitempty"`
SanitizeHost *[]string `json:",omitempty"`
SanitizeDevice *[]string `json:",omitempty"`
SanitizeHost []string `json:",omitempty"`
SanitizeDevice []string `json:",omitempty"`
SanitizeDeviceArch []string `json:",omitempty"`
}
func boolPtr(v bool) *bool {