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

Unified Diff: build/standalone.gypi

Issue 1511893004: [build system] Support code coverage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: we have to go deeper Created 5 years 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 e7843e40aa8308fd4bfeec3b70f05a4ee23671d4..301bc53e21fdc3de560dc5954ff3897e98be1dda 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -67,11 +67,15 @@
'host_arch%': '<(host_arch)',
'target_arch%': '<(host_arch)',
'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()")',
+
+ # Instrument for code coverage with gcov.
+ 'coverage%': 0,
},
'base_dir%': '<(base_dir)',
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
'v8_target_arch%': '<(target_arch)',
+ 'coverage%': '<(coverage)',
'asan%': 0,
'lsan%': 0,
'msan%': 0,
@@ -105,6 +109,7 @@
# If no gomadir is set, it uses the default gomadir.
'use_goma%': 0,
'gomadir%': '',
+
'conditions': [
# Set default gomadir.
['OS=="win"', {
@@ -112,10 +117,11 @@
}, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
- ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', {
- 'host_clang%': '1',
+ ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and \
+ coverage==0', {
+ 'host_clang%': 1,
}, {
- 'host_clang%': '0',
+ 'host_clang%': 0,
}],
# linux_use_bundled_gold: whether to use the gold linker binary checked
# into third_party/binutils. Force this off via GYP_DEFINES when you
@@ -159,6 +165,7 @@
'cfi_blacklist%': '<(cfi_blacklist)',
'test_isolation_mode%': '<(test_isolation_mode)',
'fastbuild%': '<(fastbuild)',
+ 'coverage%': '<(coverage)',
# Add a simple extras solely for the purpose of the cctests
'v8_extra_library_files': ['../test/cctest/test-extra.js'],
@@ -220,7 +227,7 @@
'v8_enable_gdbjit%': 0,
}],
['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \
- (v8_target_arch!="x87" and v8_target_arch!="x32")', {
+ (v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0', {
'clang%': 1,
}, {
'clang%': 0,
@@ -701,6 +708,11 @@
[ 'component=="shared_library"', {
'cflags': [ '-fPIC', ],
}],
+ [ 'coverage==1', {
+ 'cflags!': [ '-O3', '-O2', '-O1', ],
+ '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