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

Unified Diff: build/standalone.gypi

Issue 1297843003: Support code coverage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make clang dependent (not sure if it works) Created 5 years, 2 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/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index 400694486c5c42af314f2f350abc28bc6e1ffcef..e4935dee0c2ecac946ff9df575421670d4e15026 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -102,6 +102,10 @@
# If no gomadir is set, it uses the default gomadir.
'use_goma%': 0,
'gomadir%': '',
+
+ # Instrument for code coverage with gcov.
+ 'coverage%': 0,
+
'conditions': [
# Set default gomadir.
['OS=="win"', {
@@ -132,6 +136,11 @@
}, {
'test_isolation_mode%': 'noop',
}],
+
+ ['coverage==1', {
+ 'host_clang%': '0',
+ 'clang%': 0,
+ }],
],
},
'base_dir%': '<(base_dir)',
@@ -155,6 +164,7 @@
'cfi_diag%': '<(cfi_diag)',
'cfi_blacklist%': '<(cfi_blacklist)',
'test_isolation_mode%': '<(test_isolation_mode)',
+ 'coverage%': '<(coverage)',
# Add a simple extras solely for the purpose of the cctests
'v8_extra_library_files': ['../test/cctest/test-extra.js'],
@@ -679,6 +689,10 @@
[ 'component=="shared_library"', {
'cflags': [ '-fPIC', ],
}],
+ [ 'coverage==1', {
+ 'cflags': [ '-fprofile-arcs', '-ftest-coverage', '-O0'],
+ 'ldflags': [ '-fprofile-arcs'],
+ }],
],
},
}],
« 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