diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 9e4a305ccc..9ce59eedca 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -63,6 +63,9 @@ # third party code will still have the reduced warning settings. 'chromium_code': 1, + # Set to 1 to enable code coverage on Linux using the gcov library. + 'coverage%': 0, + # Remote bitrate estimator logging/plotting. 'enable_bwe_test_logging%': 0, @@ -261,6 +264,11 @@ }], ], }], + ['coverage==1 and OS=="linux"', { + 'cflags': [ '-ftest-coverage', + '-fprofile-arcs' ], + 'link_settings': { 'libraries': [ '-lgcov' ] }, + }], ['os_posix==1', { # For access to standard POSIXish features, use WEBRTC_POSIX instead of # a more specific macro.