diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 01:12:38 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-20 01:12:38 +0000 |
commit | 5c6f1c6b32f9da207706cf2d94560196e9d20303 (patch) | |
tree | 9442eb8482e433b812c917e7c1760c3472d8dab7 /build/internal | |
parent | 73f5d66b06b9a02626a8addecb24986a88430176 (diff) | |
download | chromium_src-5c6f1c6b32f9da207706cf2d94560196e9d20303.zip chromium_src-5c6f1c6b32f9da207706cf2d94560196e9d20303.tar.gz chromium_src-5c6f1c6b32f9da207706cf2d94560196e9d20303.tar.bz2 |
Finish release (opt) builds on Windows, including the parallel
build\*.scons structure (mirroring build\*.vsprops files):
* Use env.ApplySConscript() instead of env.SConscript with a
hand-crafted dictionary defining 'env'.
* Move various CPPPATH, CCFLAGS, CPPDEFINES, LIBS and LIBPATH
definitions from build/SConscript.main and target-specific
*.scons files into the build\*.scons files that mirror the
existing build\*.vsprops hierarchy.
* Use the new build\{debug,release}.scons files to update the
windows_dbg and windows_opt construction environments.
* Mirror current support for CHROME_BUILD_TYPE and CHROMIUM_BUILD
external environment variables.
* Remove hard-coded /TP options.
* Massage $CXXFLAGS to remove $CCFLAGS, avoiding duplication of options
on command lines. Handle the ripple effect in $PCHCOM by adding
$CCFLAGS back to that command line.
* Delete hammer's default settings of {CC,LINK}FLAGS_{DEBUG,OPTIMIZED}
so they don't pollute our construction environments.
* Update chrome config to link against v8 for opt, v8_g for dbg.
* Get rid of fragile by-hand order of using_net.scons before other
using_*.scons files. We're now using --start-group and --end-group
on Linux to deal with dependency cycles in libraries.
Review URL: http://codereview.chromium.org/11478
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/internal')
-rw-r--r-- | build/internal/chromium_build.scons | 15 | ||||
-rw-r--r-- | build/internal/chromium_build_google_chrome.scons | 15 | ||||
-rw-r--r-- | build/internal/essential.scons | 102 | ||||
-rw-r--r-- | build/internal/release_defaults.scons | 35 | ||||
-rw-r--r-- | build/internal/release_impl.scons | 18 | ||||
-rw-r--r-- | build/internal/release_impl_checksenabled.scons | 33 | ||||
-rw-r--r-- | build/internal/release_impl_coverage.scons | 17 | ||||
-rw-r--r-- | build/internal/release_impl_dom_stats.scons | 31 | ||||
-rw-r--r-- | build/internal/release_impl_official.scons | 30 | ||||
-rw-r--r-- | build/internal/release_impl_purify.scons | 29 |
10 files changed, 325 insertions, 0 deletions
diff --git a/build/internal/chromium_build.scons b/build/internal/chromium_build.scons new file mode 100644 index 0000000..397c365 --- /dev/null +++ b/build/internal/chromium_build.scons @@ -0,0 +1,15 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Chromium build settings. +""" + +Import("env") + +env.Append( + CPPDEFINES = [ + 'CHROMIUM_BUILD', + ], +) diff --git a/build/internal/chromium_build_google_chrome.scons b/build/internal/chromium_build_google_chrome.scons new file mode 100644 index 0000000..01dca62 --- /dev/null +++ b/build/internal/chromium_build_google_chrome.scons @@ -0,0 +1,15 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Google Chrome. +""" + +Import("env") + +env.Append( + CPPDEFINES = [ + 'GOOGLE_CHROME_BUILD', + ], +) diff --git a/build/internal/essential.scons b/build/internal/essential.scons new file mode 100644 index 0000000..20dfdbb --- /dev/null +++ b/build/internal/essential.scons @@ -0,0 +1,102 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Essential settings for Chromium builds. +""" + +Import("env") + +env.Append( + CPPPATH = [ + '$CHROME_SRC_DIR', + ], +) + +if env['PLATFORM'] == 'win32': + env.Append( + ARFLAGS = [ + '/ignore:4221', + ], + CPPDEFINES = [ + ('_WIN32_WINNT', '0x0600'), + ('WINVER', '0x0600'), + 'WIN32', + '_WINDOWS', + ('_HAS_EXCEPTIONS', 0), + 'NOMINMAX', + '_CRT_RAND_S', + 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', + 'WIN32_LEAN_AND_MEAN', + '_SECURE_ATL', + ], + CPPPATH = [ + '$PLATFORMSDK_VISTA/files/Include', + '$PLATFORMSDK_VISTA/files/VC/INCLUDE', + '$VISUAL_STUDIO/VC/atlmfc/include', + ], + CCFLAGS = [ + '/GR-', # VCCLCompilerTool.RuntimeTypeInfo="false" + '/Gs', # VCCLCompilerTool.BufferSecurityCheck="true" + '/Gy', # VCCLCompilerTool.EnableFunctionLevelLinking="true" + '/W3', # VCCLCompilerTool.WarningLevel="3" + + # TODO(sgk): re-enable this + #'/WX', # WarnAsError="true" + + # In the old Visual Studio build, we used /Zi (edit and continue), + # VCCLComilerTool.DebugInformationFormat="3". + # + # /Zi ends up with multiple compiler invocations trying to updat + # the same vc80.pdb file at the same time, with race conditions + # and permission problems. We're using /Z7 because it makes things + # work even in parallel builds, without special config to avoid + # multiple simultaneous updates the vc80.pdb file. All the + # debugging information and capability still end up in the + # executables. + '/Z7', # VCCLCompilerTool.DebugInformationFormat="1" + + # VCCLCompilerTool.DisableSpecificWarnings="4503; 4819" + '/wd4503', + '/wd4819', + ], + LIBPATH = [ + '$PLATFORMSDK_VISTA/files/Lib', + '$PLATFORMSDK_VISTA/files/VC/LIB', + '$VISUAL_STUDIO/VC/atlmfc/lib', + ], + LIBS = [ + 'msimg32', + 'psapi', + 'usp10.lib', + 'version', + 'wininet', + 'ws2_32', + ], + LINKFLAGS = [ + '/DEBUG', + + '/MANIFEST', + '/DELAYLOAD:"dwmapi.dll"', + '/DELAYLOAD:"uxtheme.dll"', + '/MACHINE:X86', + '/FIXED:No', + + '/safeseh', + '/dynamicbase', + '/ignore:4199', + '/ignore:4221', + '/nxcompat', + ], + ) + env.FilterOut( + CCFLAGS = [ + '/GM', # VCCLCompilerTool.MinimalRebuild="false" + '/EH', # VCCLCompilerTool.ExceptionHandling="0" + ], + ) +elif env['PLATFORM'] == 'posix': + pass +elif env['PLATFORM'] == 'mac': + pass diff --git a/build/internal/release_defaults.scons b/build/internal/release_defaults.scons new file mode 100644 index 0000000..817dec2 --- /dev/null +++ b/build/internal/release_defaults.scons @@ -0,0 +1,35 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Default settings for all Chromium release builds. + +Incorporates "essential" settings. +""" + +Import("env") + +env.ApplySConscript([ + 'essential.scons', +]) + +env.Append( + CPPDEFINES = [ + 'NDEBUG', + ], +) + +if env.Bit('windows'): + 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.scons b/build/internal/release_impl.scons new file mode 100644 index 0000000..23d0543 --- /dev/null +++ b/build/internal/release_impl.scons @@ -0,0 +1,18 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Chromium builds. +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +if env.Bit('windows'): + env.Append( + CCFLAGS = [ + '/Oy-', + ], + ) diff --git a/build/internal/release_impl_checksenabled.scons b/build/internal/release_impl_checksenabled.scons new file mode 100644 index 0000000..0bdab12 --- /dev/null +++ b/build/internal/release_impl_checksenabled.scons @@ -0,0 +1,33 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Chromium builds with checks enabled. +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +env.Append( + CPPDEFINES = [ + '_DEBUG', ' + ('_HAS_ITERATOR_DEBUGGING', '0'), + ('_SECURE_SCL', '0'), + ], +) + +if env.Bit('windows'): + env.Append( + CCFLAGS = [ + '/Oy-', + '/MTd', # VCCLCompilerTool.RuntimeLibrary="1" + ], + 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_coverage.scons b/build/internal/release_impl_coverage.scons new file mode 100644 index 0000000..ec8c547 --- /dev/null +++ b/build/internal/release_impl_coverage.scons @@ -0,0 +1,17 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Chromium builds with code coverage +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +env.Append( + LINKFLAGS = [ + '/PROFILE', # VCLinkerTool.Profile="1" + ], +) diff --git a/build/internal/release_impl_dom_stats.scons b/build/internal/release_impl_dom_stats.scons new file mode 100644 index 0000000..492e56f --- /dev/null +++ b/build/internal/release_impl_dom_stats.scons @@ -0,0 +1,31 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Chromium builds with DOM statistics. +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +env.Append( + CPPDEFINES = [ + 'NDEBUG', + 'ENABLE_DOM_STATS_COUNTERS', + ], +) + +if env['PLATFORM'] == 'win32': + 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 new file mode 100644 index 0000000..982f0636 --- /dev/null +++ b/build/internal/release_impl_official.scons @@ -0,0 +1,30 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for official Chromium builds. +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +if env.Bit('windows'): + env.Append( + ARFLAGS = [ + '/ltcg', + ], + CCFLAGS = [ + '/Ox', # VCCLCompilerTool.Optimization="3" + '/Ob2', # VCCLCompilerTool.InlineFunctionExpansion="2" + '/Oi', # VCCLCompilerTool.EnableIntrinsicFunctions="true" + '/Os', # VCCLCompilerTool.FavorSizeOrSpeed="2" + '/Ox', # VCCLCompilerTool.OmitFramePointers="true" + '/GT', # VCCLCompilerTool.EnableFiberSafeOptimizations="true" + '/GL', # VCCLCompilerTool.WholeProgramOptimization="true" + ] + LINKFLAGS = [ + '/LTCG', # VCLinkerTool.LinkTimeCodeGeneration="1" + ], + ) diff --git a/build/internal/release_impl_purify.scons b/build/internal/release_impl_purify.scons new file mode 100644 index 0000000..1a03948 --- /dev/null +++ b/build/internal/release_impl_purify.scons @@ -0,0 +1,29 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Release settings for Chromium builds with Purify. +""" + +Import("env") + +env.ApplySConscript(['release_defaults.scons']) + +env.Append( + CPPDEFINES = [ + 'PURIFY', + ], +) + +if env.Bit('windows'): + env.Append( + CCFLAGS = [ + '/Od', # VCCLCompilerTool.Optimization="0" + '/MT', # VCCLCompilerTool.RuntimeLibrary="0" + '/GS-', # VCCLCompilerTool.BufferSecurityCheck="false" + ] + LINKFLAGS = [ + '/OPT:ICF', # VCLinkerTool.EnableCOMDATFolding="1" + ], + ) |