summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/art.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/art.go b/build/art.go
index 6c9aa89f8f..19b39cdbce 100644
--- a/build/art.go
+++ b/build/art.go
@@ -153,6 +153,11 @@ func hostFlags(ctx android.BaseContext) []string {
cflags = append(cflags, "-DART_BASE_ADDRESS_MIN_DELTA="+minDelta)
cflags = append(cflags, "-DART_BASE_ADDRESS_MAX_DELTA="+maxDelta)
+ if len(ctx.AConfig().SanitizeHost()) > 0 && !envFalse(ctx, "ART_ENABLE_ADDRESS_SANITIZER") {
+ // We enable full sanitization on the host by default.
+ cflags = append(cflags, "-DART_ENABLE_ADDRESS_SANITIZER=1")
+ }
+
return cflags
}