0

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
This commit is contained in:
sgk@google.com
2008-11-20 01:12:38 +00:00
parent 73f5d66b06
commit 5c6f1c6b32
35 changed files with 506 additions and 386 deletions

@ -10,20 +10,13 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$ICU38_DIR/using_icu38.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
])
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/Wp64',
],
)

@ -10,7 +10,7 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$BASE_DIR/gfx/using_base_gfx.scons',
'$GTEST_DIR/../using_gtest.scons',
@ -18,17 +18,14 @@ env.SConscript([
'$LIBPNG_DIR/using_libpng.scons',
'$SKIA_DIR/using_skia.scons',
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
])
if env['PLATFORM'] in ('posix', 'darwin'):
env.SConscript([
env.ApplySConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
])
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'GOOGLE_CHROME_BUILD',
],
@ -40,23 +37,6 @@ if env['PLATFORM'] == 'win32':
'/TP',
'/WX',
],
CPPDEFINES = [
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
'_HAS_EXCEPTIONS=0',
],
LINKFLAGS = [
'/MANIFEST',
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
if env['PLATFORM'] == 'posix':

@ -10,23 +10,16 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$ICU38_DIR/using_icu38.scons',
'$LIBPNG_DIR/using_libpng.scons',
'$SKIA_DIR/using_skia.scons',
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
])
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/WX',
],
)

@ -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,24 +279,24 @@ 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.
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']:
msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV']
@ -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',

16
build/common.scons Normal file

@ -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 = [],
)

35
build/debug.scons Normal file

@ -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',
],
)

28
build/external_code.scons Normal file

@ -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"
],
)

@ -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',
],
)

@ -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',
],
)

@ -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

@ -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"
],
)

@ -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-',
],
)

@ -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"
],
)

@ -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"
],
)

@ -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"
],
)

@ -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"
],
)

@ -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"
],
)

18
build/release.scons Normal file

@ -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',
])

@ -63,6 +63,10 @@ if env_res['PLATFORM'] == 'win32':
env_dll = env.Clone()
env_dll.ApplySConscript([
'$CHROME_SRC_DIR/build/using_v8.scons',
])
env_dll.Prepend(
CPPPATH = [
"..",
@ -135,8 +139,6 @@ env_dll.Append(
#'libevent',
'sqlite',
'views',
#'v8',
'v8_g',
'v8_snapshot',
],
)

@ -13,6 +13,7 @@ env.SConscript([
'$CHROME_DIR/third_party/hunspell/using_hunspell.scons',
'$CHROME_DIR/third_party/wtl/using_wtl.scons',
'$CHROME_SRC_DIR/build/using_googleurl.scons',
'$CHROME_SRC_DIR/build/using_v8.scons',
'$GTEST_DIR/../using_gtest.scons',
'$ICU38_DIR/using_icu38.scons',
'$LIBJPEG_DIR/using_libjpeg.scons',
@ -54,7 +55,6 @@ env.Prepend(
'test_chrome_plugin',
'util',
'views',
'v8_g',
'v8_snapshot',
'V8Bindings',
'WebCore',

@ -16,9 +16,6 @@ env.ApplySConscript([
])
env.Prepend(
CPPDEFINES = [
'_DEBUG',
],
CPPPATH = [
'$CHROME_SRC_DIR',
],

@ -10,43 +10,18 @@ Import('env')
env = env.Clone()
env.SConscript([
# On Linux, dependencies must follow dependents, so...
# 1) net must come before base and modp_b64.
'$NET_DIR/using_net.scons',
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$GTEST_DIR/../using_gtest.scons',
'$ICU38_DIR/using_icu38.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
'$NET_DIR/using_net.scons',
])
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/WX',
],
CPPDEFINES = [
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
'_HAS_EXCEPTIONS=0',
],
LINKFLAGS = [
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
input_files = [

@ -8,21 +8,13 @@ Configuration for building net.lib / libnet.a.
Import('env')
env_res = env.Clone()
env_tests = env.Clone()
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$ICU38_DIR/using_icu38.scons',
'$SDCH_DIR/using_sdch.scons',
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
])
# These net files work on *all* platforms; files that don't work
# cross-platform live below.

@ -10,51 +10,25 @@ Import('env')
env = env.Clone()
env.SConscript([
# On Linux, dependencies must follow dependents, so...
# 1) net must come before base and modp_b64.
# 2) bzip2 must come before base.
'$NET_DIR/using_net.scons',
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$CHROME_SRC_DIR/build/using_googleurl.scons',
'$GTEST_DIR/../using_gtest.scons',
'$ICU38_DIR/using_icu38.scons',
'$MODP_B64_DIR/using_modp_b64.scons',
], {'env':env})
'$NET_DIR/using_net.scons',
])
if env['PLATFORM'] in ('posix', 'darwin'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/WX',
],
CPPDEFINES = [
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
'_HAS_EXCEPTIONS=0',
],
LINKFLAGS = [
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
elif env['PLATFORM'] == 'posix':
env.Append(

@ -11,9 +11,6 @@ Import('env')
env = env.Clone()
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
RCFLAGS = [
['/l', '0x409'],
],

@ -10,7 +10,7 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$BZIP2_DIR/using_bzip2.scons',
'$CHROME_SRC_DIR/build/using_googleurl.scons',
@ -20,41 +20,18 @@ env.SConscript([
'$NET_DIR/using_net.scons',
'$SDCH_DIR/using_sdch.scons',
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
])
if env['PLATFORM'] in ('posix', 'darwin'):
env.SConscript([
'$LIBEVENT_DIR/using_libevent.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/WX',
],
CPPDEFINES = [
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
'_HAS_EXCEPTIONS=0',
],
LINKFLAGS = [
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
input_files = [

@ -10,43 +10,18 @@ Import('env')
env = env.Clone()
env.SConscript([
# On Linux, dependencies must follow dependents, so...
# 1) net must come before base and modp_b64.
'$NET_DIR/using_net.scons',
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$GTEST_DIR/../using_gtest.scons',
'$ICU38_DIR/using_icu38.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
'$NET_DIR/using_net.scons',
])
if env['PLATFORM'] == 'win32':
env.Prepend(
CCFLAGS = [
'/TP',
'/WX',
],
CPPDEFINES = [
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
'_HAS_EXCEPTIONS=0',
],
LINKFLAGS = [
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
input_files = [

@ -10,38 +10,17 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$CHROME_SRC_DIR/build/using_googleurl.scons',
'$ICU38_DIR/using_icu38.scons',
'$NET_DIR/using_net.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
)
])
if env['PLATFORM'] == 'win32':
env.Append(
CCFLAGS = [
'/TP',
],
LINKFLAGS = [
'/INCREMENTAL',
'/MANIFEST',
'/DELAYLOAD:"dwmapi.dll"',
'/DELAYLOAD:"uxtheme.dll"',
'/DEBUG',
'/SUBSYSTEM:CONSOLE',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)

@ -6,29 +6,13 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$GTEST_DIR/../using_gtest.scons',
], {'env':env})
# Some of the sandbox sources include "gtest.h", so we need it
# in the base env here, not just in env_tests.
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'CHROMIUM_BUILD',
],
)
])
if env['PLATFORM'] == 'win32':
env.Append(
CPPDEFINES = [
'_SECURE_ATL',
'_WINDOWS',
],
CCFLAGS = [
'/TP',
'/WX', # treat warnings as errors
],
)

@ -6,21 +6,8 @@ Import('env')
env = env.Clone()
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'CHROMIUM_BUILD',
],
)
if env['PLATFORM'] == 'win32':
env.Append(
CPPDEFINES = [
'_SECURE_ATL',
'_WINDOWS',
],
CCFLAGS = [
'/WX', # treat warnings as errors
],

@ -6,48 +6,19 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$GTEST_DIR/../using_gtest.scons',
'$SANDBOX_DIR/using_sandbox.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'CHROMIUM_BUILD',
],
)
])
if env['PLATFORM'] == 'win32':
env.Append(
CPPDEFINES = [
'_SECURE_ATL',
'_WINDOWS',
],
CCFLAGS = [
'/TP',
'/WX', # treat warnings as errors
],
)
env.Prepend(
LINKFLAGS = [
'/DELAYLOAD:dwmapi.dll',
'/DELAYLOAD:uxtheme.dll',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
# TODO(bradnelson): This step generates integration_tests.pch.ib_tag
# SCons doesn't know.
env_p = env.Clone()

@ -6,47 +6,19 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$GTEST_DIR/../using_gtest.scons',
'$SANDBOX_DIR/using_sandbox.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'CHROMIUM_BUILD',
],
)
])
if env['PLATFORM'] == 'win32':
env.Append(
CPPDEFINES = [
'_SECURE_ATL',
'_WINDOWS',
],
CCFLAGS = [
'/TP',
'/WX', # treat warnings as errors
],
)
env.Prepend(
LINKFLAGS = [
'/DELAYLOAD:dwmapi.dll',
'/DELAYLOAD:uxtheme.dll',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
)
# TODO(bradnelson): This step generates unittests_tests.pch.ib_tag
# SCons doesn't know.
env_p = env.Clone()

@ -6,44 +6,20 @@ Import('env')
env = env.Clone()
env.SConscript([
env.ApplySConscript([
'$BASE_DIR/using_base.scons',
'$GTEST_DIR/../using_gtest.scons',
'$SANDBOX_DIR/using_sandbox.scons',
], {'env':env})
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
CPPDEFINES = [
'CHROMIUM_BUILD',
],
)
])
if env['PLATFORM'] == 'win32':
env.Append(
CPPDEFINES = [
'_SECURE_ATL',
'_WINDOWS',
],
CCFLAGS = [
'/TP',
'/WX', # treat warnings as errors
],
)
env.Prepend(
LINKFLAGS = [
'/DELAYLOAD:dwmapi.dll',
'/DELAYLOAD:uxtheme.dll',
'/MACHINE:X86',
'/FIXED:No',
'/safeseh',
'/dynamicbase',
'/ignore:4199',
'/nxcompat',
],
LIBS = [
'shlwapi',
],

@ -240,8 +240,6 @@ if env['PLATFORM'] == 'win32':
'_CRT_NONSTDC_NO_WARNINGS',
'_CRT_NONSTDC_NO_DEPRECATE',
['CRASH', '__debugbreak'],
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
])
env.Prepend(

@ -131,8 +131,6 @@ if env['PLATFORM'] == 'win32':
],
CPPDEFINES = [
'CRASH=__debugbreak',
'_WIN32_WINNT=0x0600',
'WINVER=0x0600',
],
CCFLAGS = [
'/TP',