diff --git a/compiler-rt/lib/gwp_asan/options.inc b/compiler-rt/lib/gwp_asan/options.inc --- a/compiler-rt/lib/gwp_asan/options.inc +++ b/compiler-rt/lib/gwp_asan/options.inc @@ -10,7 +10,16 @@ #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_DEFAULT_ENABLED_STRING +#define GWP_ASAN_DEFAULT_ENABLED_STRING GWP_ASAN_DEFAULT_ENABLED_STRING_HELPER(GWP_ASAN_DEFAULT_ENABLED) +#define GWP_ASAN_DEFAULT_ENABLED_STRING_HELPER(x) #x +#endif + +GWP_ASAN_OPTION(bool, Enabled, GWP_ASAN_DEFAULT_ENABLED, + "Is GWP-ASan enabled? Defaults to " GWP_ASAN_DEFAULT_ENABLED_STRING ".") GWP_ASAN_OPTION( bool, PerfectlyRightAlign, false,