Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: build/common.gypi

Issue 139263003: Add a GYP flag to enable coverage gathering instrumentation in ASan builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"', {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698