summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 16:23:56 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 16:23:56 +0000
commita1457f70200ae36912490d2f8a5926c9242cf56b (patch)
treee16eadc9f3d80435471826a44d7ffdb0438711fe /build
parent5d0c17fe26c9ecc7887ae976f6ee1ca7a73642da (diff)
downloadchromium_src-a1457f70200ae36912490d2f8a5926c9242cf56b.zip
chromium_src-a1457f70200ae36912490d2f8a5926c9242cf56b.tar.gz
chromium_src-a1457f70200ae36912490d2f8a5926c9242cf56b.tar.bz2
More updates to build optimization settings.
- Don't pass -s, this doesn't really help anything. The way we will have to generate our final executables is with -g, and then strip them, since we will need to keep the original for its symbols. - Only gc sections in official build. This might slightly improve release link time (at the cost of size). This allows release to build with GOLD. Review URL: http://codereview.chromium.org/18846 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/SConscript.main9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index 44c926f..44dcb20 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -516,6 +516,11 @@ linux_env.Append(
# Build an "official" build (DCHECKs completely compiled out, etc).
if ARGUMENTS.get('OFFICIAL') == '1':
linux_env.Append(CPPDEFINES=['OFFICIAL_BUILD'])
+ # Make sure units of code and data go in their own section, and then GC them
+ # in the linker to remove unreferenced data and code. Currently gold doesn't
+ # support --gc-sections, so you'll have to build with the original GNU ld.
+ linux_env.Append(CCFLAGS_OPTIMIZED=['-ffunction-sections', '-fdata-sections'])
+ linux_env.Append(LINKFLAGS_OPTIMIZED=['-Wl,--gc-sections'])
# Build with support for gcov when COVERAGE=1.
if ARGUMENTS.get('COVERAGE') == '1':
@@ -528,12 +533,8 @@ if ARGUMENTS.get('PROFILE') == '1':
linux_env.Append(LINKFLAGS=['-pg'])
# Build with symbols (useful for opt builds, for example) when SYMBOLS=1.
-# Otherwise if we're building release, strip all symbols from our output.
if ARGUMENTS.get('SYMBOLS') == '1':
linux_env.Append(CCFLAGS=['-g'])
-else:
- linux_env.Append(CCFLAGS_OPTIMIZED=['-ffunction-sections', '-fdata-sections'])
- linux_env.Append(LINKFLAGS_OPTIMIZED=['-Wl,--gc-sections', '-s'])
# Build shared libraries (useful for fast links) when SHARED=1.
if ARGUMENTS.get('SHARED') == '1':