[GWP-ASan] Respect GWP_ASAN_DEFAULT_ENABLED compile-time macro am: a9d446537a

Original change: https://android-review.googlesource.com/c/platform/external/gwp_asan/+/1506414

Change-Id: I2e245828631f6b87c62b3998df77ba4de0bf3e1a
diff --git a/gwp_asan/options.inc b/gwp_asan/options.inc
index c81e1f4..67dcfae 100644
--- a/gwp_asan/options.inc
+++ b/gwp_asan/options.inc
@@ -10,7 +10,18 @@
 #error "Define GWP_ASAN_OPTION prior to including this file!"
 #endif
 
-GWP_ASAN_OPTION(bool, Enabled, true, "Is GWP-ASan enabled? Defaults to true.")
+#ifndef GWP_ASAN_DEFAULT_ENABLED
+#define GWP_ASAN_DEFAULT_ENABLED true
+#endif
+
+#ifndef GWP_ASAN_STRINGIFY
+#define GWP_ASAN_STRINGIFY(S) GWP_ASAN_STRINGIFY_(S)
+#define GWP_ASAN_STRINGIFY_(S) #S
+#endif
+
+GWP_ASAN_OPTION(bool, Enabled, GWP_ASAN_DEFAULT_ENABLED,
+                "Is GWP-ASan enabled? Defaults to " GWP_ASAN_STRINGIFY(
+                    GWP_ASAN_DEFAULT_ENABLED) ".")
 
 GWP_ASAN_OPTION(
     bool, PerfectlyRightAlign, false,