From 1c96609d624c8ae47d0d88bd8513d70e3d87fd19 Mon Sep 17 00:00:00 2001 From: "mark@chromium.org" Date: Thu, 20 Aug 2009 21:19:26 +0000 Subject: Build for Mac in the Release configuration at -O2 BUG=16713 TEST=Watch perf. Startup time should be flat or possibly lose a very small amount (~1%). Everything else should be a little bit faster. Watch sizes. The .app and .dmg will grow, but I've cut their sizes way down lately, and I'd like to cash in some of those gains for speed. Review URL: http://codereview.chromium.org/174160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23882 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'build') diff --git a/build/common.gypi b/build/common.gypi index 200ef99..5b7790d 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -160,6 +160,9 @@ ], }, 'target_defaults': { + 'variables': { + 'mac_release_optimization%': '2' # Use -O2 unless overridden + }, 'conditions': [ ['branding=="Chrome"', { 'defines': ['GOOGLE_CHROME_BUILD'], @@ -224,13 +227,11 @@ # 2 == /INCREMENTAL # Debug links incremental, Release does not. 'Debug': { + 'xcode_settings': { + 'COPY_PHASE_STRIP': 'NO', + 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 + }, 'conditions': [ - [ 'OS=="mac"', { - 'xcode_settings': { - 'COPY_PHASE_STRIP': 'NO', - 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 - } - }], [ 'OS=="win"', { 'configuration_platform': 'Win32', 'msvs_configuration_attributes': { @@ -259,16 +260,11 @@ 'defines': [ 'NDEBUG', ], + 'xcode_settings': { + 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip + 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', + }, 'conditions': [ - [ 'OS=="mac"', { - 'xcode_settings': { - 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip - 'conditions': [ - ['mac_release_optimization != "UNSET"', - {'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)'}], - ], - } - }], [ 'OS=="win" and msvs_use_common_release', { 'configuration_platform': 'Win32', 'msvs_props': ['release.vsprops'], @@ -553,9 +549,6 @@ # with % in variables that are intended to be set to different # values in different targets, like this one. 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. - # Release defaults to the Xcode optimization default, this var - # lets you force the value. - 'mac_release_optimization%': 'UNSET' }, 'mac_bundle': 0, 'xcode_settings': { -- cgit v1.1