Chromium Code Reviews| Index: build/SConscript.main |
| diff --git a/build/SConscript.main b/build/SConscript.main |
| index 35ee04efc8852691fee704130ea0b3a50263c6d9..15865ce97d4e51be17eb32ea5596095a8fb712d5 100644 |
| --- a/build/SConscript.main |
| +++ b/build/SConscript.main |
| @@ -452,6 +452,9 @@ linux_env.Append( |
| '$LIBEVENT_DIR/libevent.scons', |
| ], |
| CCFLAGS = ['-m32', '-pthread', '-march=i686', '-fno-exceptions'], |
| + # GCC will generate ident directives with the GCC version. Accumulate |
| + # these all up and you end up with ~80K repeated in a .comment section. |
| + CCFLAGS_OPTIMIZED = ['-fno-ident'], |
| CXXFLAGS = ['-Wall', '-Werror', '-march=i686'] + excluded_warnings, |
| LINKFLAGS = ['-m32', '-pthread'], |
| ) |
| @@ -520,8 +523,12 @@ 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']) |
|
Lei Zhang
2009/01/26 22:21:23
FYI, gold does not support --gc-sections.
|
| # Build shared libraries (useful for fast links) when SHARED=1. |
| if ARGUMENTS.get('SHARED') == '1': |