| Index: build/config/BUILD.gn
|
| diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
|
| index 26bcd7d9fffff7fa6752cc3054ff9206010e4d85..eea52524483be4eed4d72356212f767c9d6f6c41 100644
|
| --- a/build/config/BUILD.gn
|
| +++ b/build/config/BUILD.gn
|
| @@ -136,13 +136,31 @@ config("feature_flags") {
|
| if (use_allocator != "tcmalloc") {
|
| defines += [ "NO_TCMALLOC" ]
|
| }
|
| - if (is_asan) {
|
| + if (is_asan || is_lsan || is_tsan || is_msan) {
|
| defines += [
|
| - "ADDRESS_SANITIZER",
|
| "MEMORY_TOOL_REPLACES_ALLOCATOR",
|
| "MEMORY_SANITIZER_INITIAL_SIZE",
|
| ]
|
| }
|
| + if (is_asan) {
|
| + defines += [ "ADDRESS_SANITIZER" ]
|
| + }
|
| + if (is_lsan) {
|
| + defines += [
|
| + "LEAK_SANITIZER",
|
| + "WTF_USE_LEAK_SANITIZER=1",
|
| + ]
|
| + }
|
| + if (is_tsan) {
|
| + defines += [
|
| + "THREAD_SANITIZER",
|
| + "DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1",
|
| + "WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1",
|
| + ]
|
| + }
|
| + if (is_msan) {
|
| + defines += [ "MEMORY_SANITIZER" ]
|
| + }
|
| if (enable_webrtc) {
|
| defines += [ "ENABLE_WEBRTC=1" ]
|
| }
|
| @@ -287,7 +305,12 @@ config("release") {
|
| # Sanitizers.
|
| # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this
|
| # condition. When Valgrind is set up, we need to do the same here.
|
| - if (!is_tsan) {
|
| + if (is_tsan) {
|
| + defines += [
|
| + "DYNAMIC_ANNOTATIONS_ENABLED=1",
|
| + "WTF_USE_DYNAMIC_ANNOTATIONS=1",
|
| + ]
|
| + } else {
|
| defines += [ "NVALGRIND" ]
|
| if (!is_nacl) {
|
| # NaCl always enables dynamic annotations. Currently this value is set to
|
|
|