michael@0: # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: { michael@0: 'variables': { michael@0: 'component%': 'static_library', michael@0: # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp. michael@0: # angle_code is set to 0 for test code, sample code, and third party code. michael@0: # When angle_code is 1, we build with additional warning flags on Mac and Linux. michael@0: 'angle_code%': 0, michael@0: 'gcc_or_clang_warnings': [ michael@0: '-Wall', michael@0: '-Wchar-subscripts', michael@0: '-Werror', michael@0: '-Wextra', michael@0: '-Wformat=2', michael@0: '-Winit-self', michael@0: '-Wno-sign-compare', michael@0: '-Wno-unused-function', michael@0: '-Wno-unused-parameter', michael@0: '-Wno-unknown-pragmas', michael@0: '-Wpacked', michael@0: '-Wpointer-arith', michael@0: '-Wundef', michael@0: '-Wwrite-strings', michael@0: ], michael@0: }, michael@0: 'target_defaults': { michael@0: 'default_configuration': 'Debug', michael@0: 'variables': { michael@0: 'warn_as_error%': 1, michael@0: }, michael@0: 'target_conditions': [ michael@0: ['warn_as_error == 1', { michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'WarnAsError': 'true', michael@0: }, michael@0: }, michael@0: }], michael@0: ], michael@0: 'configurations': { michael@0: 'Common': { michael@0: 'abstract': 1, michael@0: 'msvs_configuration_attributes': { michael@0: 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', michael@0: 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', michael@0: 'CharacterSet': '1', # UNICODE michael@0: }, michael@0: 'msvs_configuration_platform': 'Win32', michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'BufferSecurityCheck': 'true', michael@0: 'DebugInformationFormat': '3', michael@0: # TODO(alokp): Disable exceptions before integrating with chromium. michael@0: #'ExceptionHandling': '0', michael@0: 'EnableFunctionLevelLinking': 'true', michael@0: 'MinimalRebuild': 'false', michael@0: 'PreprocessorDefinitions': [ michael@0: '_CRT_SECURE_NO_DEPRECATE', michael@0: '_HAS_EXCEPTIONS=0', michael@0: '_WIN32_WINNT=0x0600', michael@0: '_WINDOWS', michael@0: 'NOMINMAX', michael@0: 'WIN32', michael@0: 'WIN32_LEAN_AND_MEAN', michael@0: 'WINVER=0x0600', michael@0: ], michael@0: 'RuntimeTypeInfo': 'false', michael@0: 'WarningLevel': '4', michael@0: 'DisableSpecificWarnings': [4100, 4127, 4189, 4239, 4244, 4245, 4512, 4702], michael@0: }, michael@0: 'VCLinkerTool': { michael@0: 'FixedBaseAddress': '1', michael@0: 'GenerateDebugInformation': 'true', michael@0: 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', michael@0: 'MapFileName': '$(OutDir)\\$(TargetName).map', michael@0: # Most of the executables we'll ever create are tests michael@0: # and utilities with console output. michael@0: 'SubSystem': '1', # /SUBSYSTEM:CONSOLE michael@0: 'AdditionalLibraryDirectories': [ michael@0: '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', michael@0: ], michael@0: }, michael@0: 'VCLibrarianTool': { michael@0: 'AdditionalLibraryDirectories': [ michael@0: '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86', michael@0: ], michael@0: }, michael@0: 'VCResourceCompilerTool': { michael@0: 'Culture': '1033', michael@0: }, michael@0: }, michael@0: 'msvs_system_include_dirs': [ michael@0: '$(ProgramFiles)/Windows Kits/8.0/Include/shared', michael@0: '$(ProgramFiles)/Windows Kits/8.0/Include/um', michael@0: ], michael@0: }, # Common michael@0: 'Debug': { michael@0: 'inherit_from': ['Common'], michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'Optimization': '0', # /Od michael@0: 'PreprocessorDefinitions': ['_DEBUG'], michael@0: 'BasicRuntimeChecks': '3', michael@0: 'RuntimeLibrary': '1', # /MTd (debug static) michael@0: }, michael@0: 'VCLinkerTool': { michael@0: 'LinkIncremental': '2', michael@0: }, michael@0: }, michael@0: 'xcode_settings': { michael@0: 'COPY_PHASE_STRIP': 'NO', michael@0: 'GCC_OPTIMIZATION_LEVEL': '0', michael@0: }, michael@0: }, # Debug michael@0: 'Release': { michael@0: 'inherit_from': ['Common'], michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'Optimization': '2', # /Os michael@0: 'PreprocessorDefinitions': ['NDEBUG'], michael@0: 'RuntimeLibrary': '0', # /MT (static) michael@0: }, michael@0: 'VCLinkerTool': { michael@0: 'LinkIncremental': '1', michael@0: }, michael@0: }, michael@0: }, # Release michael@0: }, # configurations michael@0: 'conditions': [ michael@0: ['component=="shared_library"', { michael@0: 'defines': ['COMPONENT_BUILD'], michael@0: }], michael@0: ], michael@0: }, # target_defaults michael@0: 'conditions': [ michael@0: ['OS=="win"', { michael@0: 'target_defaults': { michael@0: 'msvs_cygwin_dirs': ['../third_party/cygwin'], michael@0: }, michael@0: }], michael@0: ['OS!="win" and OS!="mac"', { michael@0: 'target_defaults': { michael@0: 'cflags': [ michael@0: '-pthread', michael@0: '-fno-exceptions', michael@0: ], michael@0: 'ldflags': [ michael@0: '-pthread', michael@0: ], michael@0: 'configurations': { michael@0: 'Debug': { michael@0: 'variables': { michael@0: 'debug_optimize%': '0', michael@0: }, michael@0: 'defines': [ michael@0: '_DEBUG', michael@0: ], michael@0: 'cflags': [ michael@0: '-O>(debug_optimize)', michael@0: '-g', michael@0: ], michael@0: } michael@0: }, michael@0: }, michael@0: }], michael@0: ['angle_code==1', { michael@0: 'target_defaults': { michael@0: 'conditions': [ michael@0: ['OS=="mac"', { michael@0: 'xcode_settings': { michael@0: 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)'] michael@0: }, michael@0: }], michael@0: ['OS!="win" and OS!="mac"', { michael@0: 'cflags': ['<@(gcc_or_clang_warnings)'] michael@0: }], michael@0: ] michael@0: } michael@0: }], michael@0: ], michael@0: } michael@0: michael@0: # Local Variables: michael@0: # tab-width:2 michael@0: # indent-tabs-mode:nil michael@0: # End: michael@0: # vim: set expandtab tabstop=2 shiftwidth=2: