summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-20 01:12:38 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-20 01:12:38 +0000
commit5c6f1c6b32f9da207706cf2d94560196e9d20303 (patch)
tree9442eb8482e433b812c917e7c1760c3472d8dab7 /build
parent73f5d66b06b9a02626a8addecb24986a88430176 (diff)
downloadchromium_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')
-rw-r--r--build/SConscript.main118
-rw-r--r--build/common.scons16
-rw-r--r--build/debug.scons35
-rw-r--r--build/external_code.scons28
-rw-r--r--build/internal/chromium_build.scons15
-rw-r--r--build/internal/chromium_build_google_chrome.scons15
-rw-r--r--build/internal/essential.scons102
-rw-r--r--build/internal/release_defaults.scons35
-rw-r--r--build/internal/release_impl.scons18
-rw-r--r--build/internal/release_impl_checksenabled.scons33
-rw-r--r--build/internal/release_impl_coverage.scons17
-rw-r--r--build/internal/release_impl_dom_stats.scons31
-rw-r--r--build/internal/release_impl_official.scons30
-rw-r--r--build/internal/release_impl_purify.scons29
-rw-r--r--build/release.scons18
15 files changed, 470 insertions, 70 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index b7665b5..be3e5e6 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -35,6 +35,9 @@ 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_SRC_DIR = '$MAIN_DIR/..',
DESTINATION_ROOT = '$MAIN_DIR/Hammer',
@@ -160,6 +163,9 @@ if ARGUMENTS.get('VERBOSE') in (None, '0'):
# Use timestamps change, followed by MD5 for speed
root_env.Decider('MD5-timestamp')
+# Incorporate settings that should apply globally (primarily to provide
+# an obvious place for developmental experimentation).
+root_env.ApplySConscript(['$CHROME_SRC_DIR/build/common.scons'])
# The list of all leaf (fully described) environments.
environment_list = []
@@ -273,23 +279,23 @@ root_env.Append(BUILD_SCONSCRIPTS = sconscripts)
# Windows specific
windows_env = root_env.Clone()
-environment_list.append(windows_env)
windows_env.Tool('target_platform_windows')
-windows_env.Tool('target_debug')
windows_env.Tool('component_targets_msvs') # Per target project support.
windows_env.Tool('midl')
-windows_env.Replace(
- BUILD_TYPE = 'debug-windows',
- BUILD_TYPE_DESCRIPTION = 'Windows debug build',
-)
-windows_env.Append(BUILD_GROUPS = ['default'])
-# TODO(bradnelson): this is needed for now because target_platform_windows
-# has OS_WINDOWS defined in a weird way.
-windows_env.FilterOut(CPPDEFINES = ['OS_WINDOWS=OS_WINDOWS'])
+# TODO(bradnelson): target_platform_windows defines a whole bunch of
+# flags that we don't care about, including defining OS_WINDOWS in a
+# way that we don't want, and (most especially) adding *_DEBUG and
+# *_OPTIMIZED constructionv variables that add magic values to
+# CCFLAGS. We override the normal variables (CPPDEFINES, CCFLAGS,
+# LINKFLAGS, ARFLAGS) below, but get rid of the special Hammer ones
+# here, until Hammer can be made a little nicer about htis.
-windows_env['PDB'] = '${TARGET.base}.pdb'
+del windows_env['CCFLAGS_DEBUG']
+del windows_env['LINKFLAGS_DEBUG']
+del windows_env['CCFLAGS_OPTIMIZED']
+windows_env['PDB'] = '${TARGET.base}.pdb'
# TODO(bradnelson): this should not need to be gated on host platform.
if root_env['PLATFORM'] in ['win32', 'cygwin']:
@@ -318,110 +324,56 @@ windows_env.Replace(
MSVS_ENV = msvs_env,
YACC = '$CYGWIN_BIN_DIR/bison.exe',
-)
-windows_env.Append(
ARFLAGS = [
'/nologo',
],
CCFLAGS = [
'/nologo',
-
- '/Od', # no optimization
-
- '/RTC1',
- '/MTd', # static link to crt, and debug version
- '/Gy',
- '/GR-',
-
- '/W3',
-
- '/Z7',
-
'/errorReport:prompt',
-
- '/wd4503',
- '/wd4819',
],
CPPDEFINES = [
- '_CRT_SECURE_NO_DEPRECATE',
- '_CRT_NONSTDC_NO_WARNINGS',
- '_CRT_NONSTDC_NO_DEPRECATE',
- '_SCL_SECURE_NO_DEPRECATE',
-
- '_DEBUG',
-
- '_CRT_RAND_S',
- ('_WIN32_WINNT', '0x0600'),
- ('WINVER', '0x0600'),
- 'WIN32',
- '_WINDOWS',
- ('_HAS_EXCEPTIONS', 0),
- 'NOMINMAX',
'_UNICODE',
'UNICODE',
-
- 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
- 'WIN32_LEAN_AND_MEAN',
],
- CPPPATH = [
- '$PLATFORMSDK_VISTA/files/Include',
- '$PLATFORMSDK_VISTA/files/VC/INCLUDE',
- '$VISUAL_STUDIO/VC/atlmfc/include',
- ],
LIBS = [
'advapi32.lib',
'comdlg32.lib',
'gdi32.lib',
'kernel32.lib',
- 'msimg32.lib',
'odbc32.lib',
'odbccp32.lib',
'ole32.lib',
'oleaut32.lib',
- 'psapi.lib',
'shell32.lib',
'user32.lib',
- 'usp10.lib',
'uuid.lib',
- 'version.lib',
- 'wininet.lib',
'winspool.lib',
- 'ws2_32.lib',
'DelayImp.lib',
],
LINKFLAGS = [
'/nologo',
- '/DEBUG',
],
ICU_LIBS = ['icu'],
)
-windows_env.Append(
- LIBPATH = [
- '$PLATFORMSDK_VISTA/files/Lib',
- '$PLATFORMSDK_VISTA/files/VC/LIB',
- '$VISUAL_STUDIO/VC/atlmfc/lib',
- ],
-)
-
-# TODO(sgk): remove once we upgrade to SCons 0.98.4
-for var in ['INCLUDE', 'LIB', 'PATH']:
- msvs_env[var] = msvs_env[var].split('|', 1)[0]
- windows_env['ENV'][var] = windows_env['ENV'][var].split('|', 1)[0]
-
# Force scons to handle long include lines correctly.
pchcom_fixed = windows_env['PCHCOM']
pchcom_fixed = pchcom_fixed.replace('${TARGETS[0]}', '$TARGET')
pchcom_fixed = pchcom_fixed.replace('${TARGETS[1]}', '$TARGETS1')
+# Below, we'll redefine $CXXFLAGS so its expansion doesn't include
+# $CCFLAGS. Modify $PCHCOM, which was relying on this fact, so
+# that $CCFLAGS still shows up in precompiled header compilations.
+pchcom_fixed = pchcom_fixed.replace('$CXXFLAGS', '$CXXFLAGS $CCFLAGS')
+
windows_env.Replace(
CCCOM = "${TEMPFILE('%s')}" % windows_env['CCCOM'],
CXXCOM = "${TEMPFILE('%s')}" % windows_env['CXXCOM'],
@@ -429,6 +381,11 @@ windows_env.Replace(
SHCXXCOM = "${TEMPFILE('%s')}" % windows_env['SHCXXCOM'],
PCHCOM = "${TEMPFILE('%s')}" % pchcom_fixed,
TARGETS1 = '${TARGETS[1]}',
+
+ # The SCons default for $CXXFLAGS contains $CCFLAGS, which is
+ # also on the $CCCOM command line string separately. Redefine
+ # $CXXFLAGS to avoid the duplication
+ CXXFLAGS = '$( /TP $)',
)
windows_env['ENV']['PROGRAMFILES'] = os.environ.get('PROGRAMFILES', '')
@@ -437,6 +394,24 @@ windows_env['ENV']['USERPROFILE'] = os.environ.get('USERPROFILE', '')
windows_env.AppendENVPath('PATH', ';C:\\WINDOWS\\system32')
+windows_dbg = windows_env.Clone()
+environment_list.append(windows_dbg)
+windows_dbg.Replace(
+ BUILD_TYPE = 'dbg',
+ BUILD_TYPE_DESCRIPTION = 'Windows debug build',
+)
+windows_dbg.Tool('target_debug')
+windows_dbg.ApplySConscript(['$CHROME_SRC_DIR/build/debug.scons'])
+windows_dbg.Append(BUILD_GROUPS = ['default'])
+
+windows_opt = windows_env.Clone()
+environment_list.append(windows_opt)
+windows_opt.Replace(
+ BUILD_TYPE = 'opt',
+ BUILD_TYPE_DESCRIPTION = 'Windows optimized build',
+)
+windows_opt.Tool('target_optimized')
+windows_opt.ApplySConscript(['$CHROME_SRC_DIR/build/release.scons'])
# --------------------------------------------------------------------------
# Linux specific
@@ -568,6 +543,7 @@ linux_dbg.Replace(
BUILD_TYPE_DESCRIPTION = 'Linux debug build',
)
linux_dbg.Tool('target_debug')
+linux_dbg.ApplySConscript(['$CHROME_SRC_DIR/build/debug.scons'])
linux_dbg.Append(BUILD_GROUPS = ['default'])
linux_opt = linux_env.Clone()
@@ -579,6 +555,7 @@ linux_opt.Replace(
BUILD_TYPE_DESCRIPTION = 'Linux optimized build',
)
linux_opt.Tool('target_optimized')
+linux_opt.ApplySConscript(['$CHROME_SRC_DIR/build/release.scons'])
# --------------------------------------------------------------------------
# Mac specific
@@ -587,6 +564,7 @@ mac_env = root_env.Clone()
environment_list.append(mac_env)
mac_env.Tool('target_platform_mac')
mac_env.Tool('target_debug')
+mac_env.ApplySConscript(['$CHROME_SRC_DIR/build/debug.scons'])
mac_env.Replace(
BUILD_TYPE = 'debug-mac',
BUILD_TYPE_DESCRIPTION = 'Mac debug build',
diff --git a/build/common.scons b/build/common.scons
new file mode 100644
index 0000000..48c1f0e
--- /dev/null
+++ b/build/common.scons
@@ -0,0 +1,16 @@
+# 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__ = """
+Common (no-op) settings for Chromium builds.
+"""
+
+# This is where you can set values to affect *everything* in the build.
+
+Import("env")
+
+env.Append(
+ #CCFLAGS = [],
+ #LIBFLAGS = [],
+)
diff --git a/build/debug.scons b/build/debug.scons
new file mode 100644
index 0000000..f056fcd
--- /dev/null
+++ b/build/debug.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__ = """
+Debug settings for Chromium builds.
+
+Incorporates "essential" and "chromium_build" settings.
+"""
+
+Import("env")
+
+env.ApplySConscript([
+ 'internal/essential.scons',
+ 'internal/chromium_build${CHROMIUM_BUILD}.scons',
+])
+
+env.Append(
+ CPPDEFINES = [
+ '_DEBUG',
+ ],
+)
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/Od', # VCCLCompilerTool.Optimization="0"
+ '/RTC1', # VCCLCompilerTool.BasicRuntimeChecks="3"
+ '/MTd', # VCCLCompilerTool.RuntimeLibrary="1"
+ ],
+ LINKFLAGS = [
+ '/INCREMENTAL', # VCLinkerTool.LinkIncremental="2"
+ '/DEBUG',
+ ],
+ )
diff --git a/build/external_code.scons b/build/external_code.scons
new file mode 100644
index 0000000..45c039f
--- /dev/null
+++ b/build/external_code.scons
@@ -0,0 +1,28 @@
+# 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__ = """
+External code settings for Chromium builds.
+"""
+
+Import("env")
+
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CPPDEFINES = [
+ '_CRT_SECURE_NO_DEPRECATE',
+ '_CRT_NONSTDC_NO_WARNINGS',
+ '_CRT_NONSTDC_NO_DEPRECATE',
+ '_SCL_SECURE_NO_DEPRECATE',
+ ],
+ CCFLAGS = [
+ '/wd4800',
+ ],
+ )
+ env.FilterOut(
+ CCFLAGS = [
+ '/WX', # VCCLCompilerTool.WarnAsError="false"
+ '/Wp64', # VCCLCompilerTool.Detect64BitPortabilityProblems="false"
+ ],
+ )
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"
+ ],
+ )
diff --git a/build/release.scons b/build/release.scons
new file mode 100644
index 0000000..2d7144e
--- /dev/null
+++ b/build/release.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.
+
+Incorporates "release_impl" and "chromium_build" settings,
+possibly specific versions selected by the $CHROME_BUILD_TYPE
+and $CHROMIUM_BUILD variables.
+"""
+
+Import("env")
+
+env.ApplySConscript([
+ 'internal/release_impl${CHROME_BUILD_TYPE}.scons',
+ 'internal/chromium_build${CHROMIUM_BUILD}.scons',
+])