summaryrefslogtreecommitdiffstats
path: root/build/internal/essential.scons
diff options
context:
space:
mode:
Diffstat (limited to 'build/internal/essential.scons')
-rw-r--r--build/internal/essential.scons102
1 files changed, 102 insertions, 0 deletions
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