diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 19:37:00 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-11 19:37:00 +0000 |
commit | ffd984b1c946f134b79e0eaa176b45211a39de12 (patch) | |
tree | 4efab3493f6e137d924a9abaae8cc0ba59926f72 /build/common.gypi | |
parent | 57f71b9187924492807e06a1194283695cc1a045 (diff) | |
download | chromium_src-ffd984b1c946f134b79e0eaa176b45211a39de12.zip chromium_src-ffd984b1c946f134b79e0eaa176b45211a39de12.tar.gz chromium_src-ffd984b1c946f134b79e0eaa176b45211a39de12.tar.bz2 |
There was already release_extra_cflags for linux;
this just generalizes it to debug_ and to mac.
Required a litle rearranging. Tested by comparing
xcode and make files before and after change.
Ignores those settings when generating Visual C++ projects,
but since the goal was to let valgrind bots tweak
optimization settings, that's ok for now.
Review URL: http://codereview.chromium.org/202054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/build/common.gypi b/build/common.gypi index 11800f4..2026ca6 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -170,7 +170,9 @@ 'target_defaults': { 'variables': { 'mac_release_optimization%': '3', # Use -O3 unless overridden - 'mac_debug_optimization%': '0' # Use -O0 unless overridden + 'mac_debug_optimization%': '0', # Use -O0 unless overridden + 'release_extra_cflags%': '', + 'debug_extra_cflags%': '', }, 'defines': [ '<@(extra_custom_defines)', @@ -237,6 +239,7 @@ 'xcode_settings': { 'COPY_PHASE_STRIP': 'NO', 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', + 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ], }, 'conditions': [ [ 'OS=="win"', { @@ -261,6 +264,11 @@ }, }, }], + ['OS=="linux"', { + 'cflags': [ + '<@(debug_extra_cflags)', + ], + }], ], }, 'Release': { @@ -270,6 +278,7 @@ 'xcode_settings': { 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', + 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], }, 'conditions': [ [ 'OS=="win" and msvs_use_common_release', { @@ -288,6 +297,11 @@ }, }, }], + ['OS=="linux"', { + 'cflags': [ + '<@(release_extra_cflags)', + ], + }], ], }, 'conditions': [ @@ -453,7 +467,6 @@ 'Release': { 'variables': { 'release_optimize%': '2', - 'release_extra_cflags%': '', }, 'cflags': [ '-O<(release_optimize)', @@ -464,7 +477,6 @@ # can be removed at link time with --gc-sections. '-fdata-sections', '-ffunction-sections', - '<(release_extra_cflags)', ], }, }, |