Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 43a3d7f00547d25a4f49742d371239d4d17ffedb..98cd460d508a3d1a64a98bae463b0413d344c0a5 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -357,6 +357,8 @@ |
# -fsanitize=address only works with clang, but asan=1 implies clang=1 |
# See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
'asan%': 0, |
+ # Enable coverage gathering instrumentation in ASan. |
+ 'asan_coverage%': 0, |
# Enable building with LSan (Clang's -fsanitize=leak option). |
# -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
@@ -933,6 +935,7 @@ |
'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
'asan%': '<(asan)', |
+ 'asan_coverage%': '<(asan_coverage)', |
Alexander Potapenko
2014/01/15 16:35:01
Can we have asan_coverage=1 imply asan=1?
|
'lsan%': '<(lsan)', |
'msan%': '<(msan)', |
'tsan%': '<(tsan)', |
@@ -3464,6 +3467,15 @@ |
}], |
], |
}], |
+ ['asan_coverage==1', { |
+ 'target_conditions': [ |
+ ['_toolset=="target"', { |
+ 'cflags': [ |
+ '-mllvm -asan-coverage=1', |
+ ], |
+ }], |
+ ], |
+ }], |
['lsan==1', { |
'target_conditions': [ |
['_toolset=="target"', { |
@@ -4118,6 +4130,15 @@ |
'MEMORY_TOOL_REPLACES_ALLOCATOR', |
], |
}], |
+ ['asan_coverage==1', { |
+ 'target_conditions': [ |
+ ['_toolset=="target"', { |
+ 'cflags': [ |
+ '-mllvm -asan-coverage=1', |
Alexander Potapenko
2014/01/15 16:35:01
What about the xcode-specific flags?
|
+ ], |
+ }], |
+ ], |
+ }], |
], |
'target_conditions': [ |
['_type!="static_library"', { |