gfx/angle/build/common.gypi

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
     2 # Use of this source code is governed by a BSD-style license that can be
     3 # found in the LICENSE file.
     5 {
     6   'variables': {
     7     'component%': 'static_library',
     8     # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp.
     9     # angle_code is set to 0 for test code, sample code, and third party code.
    10     # When angle_code is 1, we build with additional warning flags on Mac and Linux.
    11     'angle_code%': 0,
    12     'gcc_or_clang_warnings': [
    13       '-Wall',
    14       '-Wchar-subscripts',
    15       '-Werror',
    16       '-Wextra',
    17       '-Wformat=2',
    18       '-Winit-self',
    19       '-Wno-sign-compare',
    20       '-Wno-unused-function',
    21       '-Wno-unused-parameter',
    22       '-Wno-unknown-pragmas',
    23       '-Wpacked',
    24       '-Wpointer-arith',
    25       '-Wundef',
    26       '-Wwrite-strings',
    27     ],
    28   },
    29   'target_defaults': {
    30     'default_configuration': 'Debug',
    31     'variables': {
    32       'warn_as_error%': 1,
    33     },
    34     'target_conditions': [
    35       ['warn_as_error == 1', {
    36         'msvs_settings': {
    37           'VCCLCompilerTool': {
    38             'WarnAsError': 'true',
    39           },
    40         },
    41       }],
    42     ],
    43     'configurations': {
    44       'Common': {
    45         'abstract': 1,
    46         'msvs_configuration_attributes': {
    47           'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
    48           'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
    49           'CharacterSet': '1',  # UNICODE
    50         },
    51         'msvs_configuration_platform': 'Win32',
    52         'msvs_settings': {
    53           'VCCLCompilerTool': {
    54             'BufferSecurityCheck': 'true',
    55             'DebugInformationFormat': '3',
    56             # TODO(alokp): Disable exceptions before integrating with chromium.
    57             #'ExceptionHandling': '0',
    58             'EnableFunctionLevelLinking': 'true',
    59             'MinimalRebuild': 'false',
    60             'PreprocessorDefinitions': [
    61               '_CRT_SECURE_NO_DEPRECATE',
    62               '_HAS_EXCEPTIONS=0',
    63               '_WIN32_WINNT=0x0600',
    64               '_WINDOWS',
    65               'NOMINMAX',
    66               'WIN32',
    67               'WIN32_LEAN_AND_MEAN',
    68               'WINVER=0x0600',
    69             ],
    70             'RuntimeTypeInfo': 'false',
    71             'WarningLevel': '4',
    72             'DisableSpecificWarnings': [4100, 4127, 4189, 4239, 4244, 4245, 4512, 4702],
    73           },
    74           'VCLinkerTool': {
    75             'FixedBaseAddress': '1',
    76             'GenerateDebugInformation': 'true',
    77             'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
    78             'MapFileName': '$(OutDir)\\$(TargetName).map',
    79             # Most of the executables we'll ever create are tests
    80             # and utilities with console output.
    81             'SubSystem': '1',  # /SUBSYSTEM:CONSOLE
    82             'AdditionalLibraryDirectories': [
    83               '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86',
    84             ],
    85           },
    86           'VCLibrarianTool': {
    87             'AdditionalLibraryDirectories': [
    88               '$(ProgramFiles)/Windows Kits/8.0/Lib/win8/um/x86',
    89             ],
    90           },
    91           'VCResourceCompilerTool': {
    92             'Culture': '1033',
    93           },
    94         },
    95         'msvs_system_include_dirs': [
    96           '$(ProgramFiles)/Windows Kits/8.0/Include/shared',
    97           '$(ProgramFiles)/Windows Kits/8.0/Include/um',
    98         ],
    99       },  # Common
   100       'Debug': {
   101         'inherit_from': ['Common'],
   102         'msvs_settings': {
   103           'VCCLCompilerTool': {
   104             'Optimization': '0',  # /Od
   105             'PreprocessorDefinitions': ['_DEBUG'],
   106             'BasicRuntimeChecks': '3',
   107             'RuntimeLibrary': '1',  # /MTd (debug static)
   108           },
   109           'VCLinkerTool': {
   110             'LinkIncremental': '2',
   111           },
   112         },
   113         'xcode_settings': {
   114           'COPY_PHASE_STRIP': 'NO',
   115           'GCC_OPTIMIZATION_LEVEL': '0',
   116         },
   117       },  # Debug
   118       'Release': {
   119         'inherit_from': ['Common'],
   120         'msvs_settings': {
   121           'VCCLCompilerTool': {
   122             'Optimization': '2',  # /Os
   123             'PreprocessorDefinitions': ['NDEBUG'],
   124             'RuntimeLibrary': '0',  # /MT (static)
   125           },
   126           'VCLinkerTool': {
   127             'LinkIncremental': '1',
   128           },
   129         },
   130       },  # Release
   131     },  # configurations
   132     'conditions': [
   133       ['component=="shared_library"', {
   134         'defines': ['COMPONENT_BUILD'],
   135       }],
   136     ],
   137   },  # target_defaults
   138   'conditions': [
   139     ['OS=="win"', {
   140       'target_defaults': {
   141         'msvs_cygwin_dirs': ['../third_party/cygwin'],
   142       },
   143     }],
   144     ['OS!="win" and OS!="mac"', {
   145       'target_defaults': {
   146         'cflags': [
   147           '-pthread',
   148           '-fno-exceptions',
   149         ],
   150         'ldflags': [
   151           '-pthread',
   152         ],
   153         'configurations': {
   154           'Debug': {
   155             'variables': {
   156               'debug_optimize%': '0',
   157             },
   158             'defines': [
   159               '_DEBUG',
   160             ],
   161             'cflags': [
   162               '-O>(debug_optimize)',
   163               '-g',
   164             ],
   165           }
   166         },
   167       },
   168     }],
   169     ['angle_code==1', {
   170       'target_defaults': {
   171         'conditions': [
   172           ['OS=="mac"', {
   173             'xcode_settings': {
   174               'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)']
   175             },
   176           }],
   177           ['OS!="win" and OS!="mac"', {
   178             'cflags': ['<@(gcc_or_clang_warnings)']
   179           }],
   180         ]
   181       }
   182     }],
   183   ],
   184 }
   186 # Local Variables:
   187 # tab-width:2
   188 # indent-tabs-mode:nil
   189 # End:
   190 # vim: set expandtab tabstop=2 shiftwidth=2:

mercurial