diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 01:10:01 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-22 01:10:01 +0000 |
commit | 15bba9a233a7b2b4a7a371e96436c2fdd17ed3dc (patch) | |
tree | 87c003413ac1d07983640c4e0af0ef2b8717066b | |
parent | cc1599105a6b17737b6e49618ee428b8e6a63496 (diff) | |
download | chromium_src-15bba9a233a7b2b4a7a371e96436c2fdd17ed3dc.zip chromium_src-15bba9a233a7b2b4a7a371e96436c2fdd17ed3dc.tar.gz chromium_src-15bba9a233a7b2b4a7a371e96436c2fdd17ed3dc.tar.bz2 |
Purify support:
* Add third_party/purify/pure_api.c to the base\base_lib.scons sources.
* Support specification of CHROME_BUILD_TYPE (and CHROMIUM_BUILD
while we're here) either on the command line or as an
external environment variable.
* Fix syntax error in release_impl_purify.scons (previously unused).
* Add a central $CHROMIUM_CC_OPT_FLAGS variable (included in $CCFLAGS)
that can be used to set explicitly the optimization level without
having to worry about optimization flags being pulled in from other
settings files.
Review URL: http://codereview.chromium.org/11368
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5887 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/base_lib.scons | 1 | ||||
-rw-r--r-- | build/SConscript.main | 13 | ||||
-rw-r--r-- | build/internal/essential.scons | 6 | ||||
-rw-r--r-- | build/internal/release_defaults.scons | 14 | ||||
-rw-r--r-- | build/internal/release_impl_dom_stats.scons | 10 | ||||
-rw-r--r-- | build/internal/release_impl_official.scons | 6 | ||||
-rw-r--r-- | build/internal/release_impl_purify.scons | 12 |
7 files changed, 48 insertions, 14 deletions
diff --git a/base/base_lib.scons b/base/base_lib.scons index f26d3e3..b2caa8b 100644 --- a/base/base_lib.scons +++ b/base/base_lib.scons @@ -153,6 +153,7 @@ if env['PLATFORM'] == 'win32': 'system_monitor_win.cc', 'thread_local_storage_win.cc', 'thread_local_win.cc', + 'third_party/purify/pure_api.c', 'time_win.cc', 'waitable_event_win.cc', 'win_util.cc', diff --git a/build/SConscript.main b/build/SConscript.main index 152dc09..d2fa331 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -19,6 +19,15 @@ default_warnings = ['no-no-parallel-support'] SetOption('warn', default_warnings + GetOption('warn')) +chrome_build_type = ARGUMENTS.get('CHROME_BUILD_TYPE') +if chrome_build_type is None: + chrome_build_type = os.environ.get('CHROME_BUILD_TYPE', ''), + +chromium_build = ARGUMENTS.get('CHROMIUM_BUILD') +if chromium_build is None: + chromium_build = os.environ.get('CHROMIUM_BUILD', ''), + + root_env = Environment( tools = ['component_setup', 'chromium_builders', @@ -30,8 +39,8 @@ root_env = Environment( # All supported system libraries, for the help message all_system_libs = [], - CHROME_BUILD_TYPE = os.environ.get('CHROME_BUILD_TYPE', ''), - CHROMIUM_BUILD = os.environ.get('CHROMIUM_BUILD', ''), + CHROME_BUILD_TYPE = chrome_build_type, + CHROMIUM_BUILD = chromium_build, CHROME_SRC_DIR = '$MAIN_DIR/..', DESTINATION_ROOT = '$MAIN_DIR/Hammer', diff --git a/build/internal/essential.scons b/build/internal/essential.scons index 20dfdbb..1b5ddf3 100644 --- a/build/internal/essential.scons +++ b/build/internal/essential.scons @@ -12,6 +12,12 @@ env.Append( CPPPATH = [ '$CHROME_SRC_DIR', ], + CCFLAGS = [ + '$CHROMIUM_CC_OPT_FLAGS', + ], + LINKFLAGS = [ + '$CHROMIUM_LINK_OPT_FLAGS', + ], ) if env['PLATFORM'] == 'win32': diff --git a/build/internal/release_defaults.scons b/build/internal/release_defaults.scons index 817dec2..612bcbc 100644 --- a/build/internal/release_defaults.scons +++ b/build/internal/release_defaults.scons @@ -21,15 +21,21 @@ env.Append( ) if env.Bit('windows'): + env.Replace( + CHROMIUM_CC_OPT_FLAGS = [ + '/O2', # VCCLCompilerTool.Optimization="2" + ], + CHROMIUM_LINK_OPT_FLAGS = [ + '/OPT:REF', # VCLinkerTool.OptimizeReferences="2" + '/OPT:NOICF', # VCLinkerTool.EnableCOMDATFolding="2" + '/OPT:NOWIN98', # VCLinkerTool.OptimizeForWindows98="1" + ], + ), env.Append( CCFLAGS = [ - '/O2', # VCCLCompilerTool.Optimization="2" '/GF', # VCCLCompilerTool.StringPooling="true" ], LINKFLAGS = [ '/INCREMENTAL:NO', # VCLinkerTool.LinkIncremental="1" - '/OPT:REF', # VCLinkerTool.OptimizeReferences="2" - '/OPT:ICF', # VCLinkerTool.EnableCOMDATFolding="2" - '/OPT:NOWIN98', # VCLinkerTool.OptimizeForWindows98="1" ], ) diff --git a/build/internal/release_impl_dom_stats.scons b/build/internal/release_impl_dom_stats.scons index 492e56f..d878592 100644 --- a/build/internal/release_impl_dom_stats.scons +++ b/build/internal/release_impl_dom_stats.scons @@ -18,14 +18,18 @@ env.Append( ) if env['PLATFORM'] == 'win32': + env.Replace( + CHROMIUM_LINK_OPT_FLAGS = [ + '/OPT:REF', # VCLinkerTool.OptimizeReferences="2" + '/OPT:NOICF', # VCLinkerTool.EnableCOMDATFolding="2" + '/OPT:NOWIN98', # VCLinkerTool.OptimizeForWindows98="1" + ], + ), env.Append( CCFLAGS = [ '/Oy-', ] LINKFLAGS = [ '/INCREMENTAL:NO', # VCLinkerTool.LinkIncremental="1" - '/OPT:REF', # VCLinkerTool.OptimizeReferences="2" - '/OPT:ICF', # VCLinkerTool.EnableCOMDATFolding="2" - '/OPT:NOWIN98', # VCLinkerTool.OptimizeForWindows98="1" ], ) diff --git a/build/internal/release_impl_official.scons b/build/internal/release_impl_official.scons index 982f0636..cb6921f 100644 --- a/build/internal/release_impl_official.scons +++ b/build/internal/release_impl_official.scons @@ -11,12 +11,16 @@ Import("env") env.ApplySConscript(['release_defaults.scons']) if env.Bit('windows'): + env.Replace( + CHROMIUM_CC_OPT_FLAGS = [ + '/Ox', # VCCLCompilerTool.Optimization="3" + ], + ), env.Append( ARFLAGS = [ '/ltcg', ], CCFLAGS = [ - '/Ox', # VCCLCompilerTool.Optimization="3" '/Ob2', # VCCLCompilerTool.InlineFunctionExpansion="2" '/Oi', # VCCLCompilerTool.EnableIntrinsicFunctions="true" '/Os', # VCCLCompilerTool.FavorSizeOrSpeed="2" diff --git a/build/internal/release_impl_purify.scons b/build/internal/release_impl_purify.scons index 1a03948..912f555 100644 --- a/build/internal/release_impl_purify.scons +++ b/build/internal/release_impl_purify.scons @@ -17,13 +17,17 @@ env.Append( ) if env.Bit('windows'): + env.Replace( + CHROMIUM_CC_OPT_FLAGS = [ + '/Od', # VCCLCompilerTool.Optimization="0" + ], + CHROMIUM_LINK_OPT_FLAGS = [ + '/OPT:NOICF', # VCLinkerTool.EnableCOMDATFolding="2" + ], + ), env.Append( CCFLAGS = [ - '/Od', # VCCLCompilerTool.Optimization="0" '/MT', # VCCLCompilerTool.RuntimeLibrary="0" '/GS-', # VCCLCompilerTool.BufferSecurityCheck="false" - ] - LINKFLAGS = [ - '/OPT:ICF', # VCLinkerTool.EnableCOMDATFolding="1" ], ) |