# 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', ], CCFLAGS = [ '$CHROMIUM_CC_OPT_FLAGS', ], LINKFLAGS = [ '$CHROMIUM_LINK_OPT_FLAGS', ], ) 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', ('_HAS_TR1', 0), ], 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