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

Unified Diff: webrtc/build/common.gypi

Issue 2144273002: Add minimal LLVM sanity coverage (sancov) reporting for unittests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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 | « tools/sancov/blacklist.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/build/common.gypi
diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi
index 36a2daedf03eee876483d7e1a1cecfeb00200195..434e0a425819d56c63d92ed2bc3b1ebea530b20f 100644
--- a/webrtc/build/common.gypi
+++ b/webrtc/build/common.gypi
@@ -98,6 +98,13 @@
# Set to 1 to enable code coverage on Linux using the gcov library.
'coverage%': 0,
+ # Set to "func", "block", "edge" for coverage generation.
+ # At unit test runtime set UBSAN_OPTIONS="coverage=1".
+ # It is recommend to set include_examples=0.
+ # Use llvm's sancov -html-report for human readable reports.
+ # See http://clang.llvm.org/docs/SanitizerCoverage.html .
+ 'webrtc_sanitize_coverage%': "",
phoglund 2016/07/19 19:12:40 We need to have parity between gn and gyp; please
johan 2016/07/21 12:33:22 Done, gn files use name pattern "rtc_.*" while gyp
+
# Remote bitrate estimator logging/plotting.
'enable_bwe_test_logging%': 0,
@@ -404,6 +411,17 @@
'ldflags': [ '--coverage' ],
'link_settings': { 'libraries': [ '-lgcov' ] },
}],
+ ['webrtc_sanitize_coverage!=""', {
+ 'cflags': [ '-fsanitize-coverage=<(webrtc_sanitize_coverage)' ],
+ 'ldflags': [ '-fsanitize-coverage=<(webrtc_sanitize_coverage)' ],
+ }],
+ ['webrtc_sanitize_coverage!="" and OS=="mac"', {
+ 'xcode_settings': {
+ 'OTHER_CFLAGS': [
+ '-fsanitize-coverage=func',
+ ],
+ },
+ }],
['os_posix==1', {
# For access to standard POSIXish features, use WEBRTC_POSIX instead of
# a more specific macro.
« no previous file with comments | « tools/sancov/blacklist.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698