summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 09:27:48 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 09:27:48 +0000
commit98c42fa26eb5a43436812e3a6b88d1ab8e10b7af (patch)
treed4e3077dcab4022d5345ecb04a6afb435aa86d65
parent677c9057fafb4c263f001ded0e173075a945a4c2 (diff)
downloadchromium_src-98c42fa26eb5a43436812e3a6b88d1ab8e10b7af.zip
chromium_src-98c42fa26eb5a43436812e3a6b88d1ab8e10b7af.tar.gz
chromium_src-98c42fa26eb5a43436812e3a6b88d1ab8e10b7af.tar.bz2
Support gprof and symbols options to the Linux build.
Both will work in either dbg or opt. SYMBOLS=1 is useful when building an opt build with debugging symbols. PROFILE=1 builds with gprof instrumentation. Review URL: http://codereview.chromium.org/13337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6700 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/SConscript.main9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index 0fb14d4..6af08a9 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -468,6 +468,15 @@ if ARGUMENTS.get('COVERAGE') == '1':
linux_env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage'])
linux_env.Append(LINKFLAGS=['-fprofile-arcs'])
+# Build with support for gprof when PROFILE=1.
+if ARGUMENTS.get('PROFILE') == '1':
+ linux_env.Append(CCFLAGS=['-pg', '-g'])
+ linux_env.Append(LINKFLAGS=['-pg'])
+
+# Build with symbols (useful for opt builds, for example) when SYMBOLS=1.
+if ARGUMENTS.get('SYMBOLS') == '1':
+ linux_env.Append(CCFLAGS=['-g'])
+
# Build with system-provided NSS and GTK.
if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
try: