summaryrefslogtreecommitdiffstats
path: root/build/internal
diff options
context:
space:
mode:
Diffstat (limited to 'build/internal')
-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
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"
+ ],
+ )