Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6581)

Unified Diff: build/SConscript.main

Issue 11478: Finish replicating the *.vsprops structure. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/gfx/base_gfx.scons ('k') | build/common.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/SConscript.main
===================================================================
--- build/SConscript.main (revision 5681)
+++ build/SConscript.main (working copy)
@@ -35,6 +35,9 @@
# 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 @@
# 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 @@
# 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 @@
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 @@
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,7 +394,25 @@
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
« no previous file with comments | « base/gfx/base_gfx.scons ('k') | build/common.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698