From 7cb98a23d0be29c2b5ceafa6f9e4b1d8e98cd282 Mon Sep 17 00:00:00 2001 From: "deanm@google.com" Date: Mon, 18 Aug 2008 13:22:29 +0000 Subject: Add a COVERAGE=1 argument to the Linux scons build. This compiles the object files with support for gcov. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@983 0039d316-1c4b-4281-b951-d872f2087c98 --- build/SConscript.main | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build/SConscript.main') diff --git a/build/SConscript.main b/build/SConscript.main index 3f7623f..eb18a5f 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -338,6 +338,10 @@ elif env['PLATFORM'] == 'posix': # We need pthread for threading, and rt for clock_gettime. LIBS = ['pthread', 'rt'], ) + # Build with support for gcov when COVERAGE=1. + if ARGUMENTS.get('COVERAGE') == '1': + env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage']) + env.Append(LINKFLAGS=['-fprofile-arcs']) else: -- cgit v1.1