• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2013 Google Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8#     * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10#     * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14#     * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29#
30{
31  'variables': {
32    # If set to 1, doesn't compile debug symbols into webcore reducing the
33    # size of the binary and increasing the speed of gdb.  gcc only.
34    'remove_webcore_debug_symbols%': 0,
35    'enable_oilpan%': 0,
36    # If set to 1 (default) and using clang, the Blink GC plugin will check the
37    # usage of the garbage-collection infrastructure during compilation.
38    'blink_gc_plugin%': 1,
39    # Additional flags for the Blink GC plugin.
40    'blink_gc_plugin_flags%': '',
41    # If set to 1, the Blink will use the base allocator instead of
42    # PartitionAlloc. so that the top of stack-unwinding becomes the caller
43    # which requests memory allocation in blink.
44    'blink_disable_partition_allocator%': 0,
45  },
46  'targets': [
47  {
48    # GN version: //third_party/WebKit/Source:config
49    #   (In GN this is a config rather than a target.)
50    'target_name': 'config',
51    'type': 'none',
52    'direct_dependent_settings': {
53      'include_dirs': [
54        '.',
55        '..',
56      ],
57      'msvs_disabled_warnings': [
58        4305, 4324, 4714, 4800, 4996,
59      ],
60      'variables': {
61        'chromium_code': 1,
62        'clang_warning_flags': [ '-Wglobal-constructors' ],
63      },
64      'conditions': [
65        ['OS=="win" and component=="shared_library"', {
66          'defines': [
67            'USING_V8_SHARED',
68          ],
69        }],
70        ['OS=="win"', {
71          'sources/': [
72            ['exclude', 'Posix\\.cpp$'],
73          ],
74        },{ # OS!="win"
75          'sources/': [
76            ['exclude', 'Win\\.cpp$'],
77          ],
78        }],
79        ['OS!="mac"', {
80          'sources/': [
81            ['exclude', 'Mac\\.mm$'],
82          ],
83        }],
84        ['OS!="android"', {
85          'sources/': [
86            ['exclude', 'Android\\.cpp$'],
87          ],
88        }],
89        ['OS!="win" and remove_webcore_debug_symbols==1', {
90          # Remove -g from all targets defined here.
91          'cflags!': ['-g'],
92        }],
93        ['gcc_version>=46', {
94          # Disable warnings about c++0x compatibility, as some names (such as
95          # nullptr) conflict with upcoming c++0x types.
96          'cflags_cc': ['-Wno-c++0x-compat'],
97        }],
98        ['OS=="linux" and target_arch=="arm"', {
99          # Due to a bug in gcc arm, we get warnings about uninitialized
100          # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879.
101          'cflags': ['-Wno-uninitialized'],
102        }],
103        # Only enable the blink_gc_plugin when using clang and chrome plugins.
104        ['blink_gc_plugin==1 and clang==1 and clang_use_chrome_plugins==1', {
105          'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) <(blink_gc_plugin_flags))'],
106          'xcode_settings': {
107            'OTHER_CFLAGS': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) <(blink_gc_plugin_flags))'],
108          },
109        }],
110        ['blink_disable_partition_allocator==1', {
111          'defines': [
112            'MEMORY_TOOL_REPLACES_ALLOCATOR',
113          ],
114        }],
115      ],
116    },
117  },
118  {
119    'target_name': 'unittest_config',
120    'type': 'none',
121    'dependencies': [
122      'config',
123      '<(DEPTH)/testing/gmock.gyp:gmock',
124      '<(DEPTH)/testing/gtest.gyp:gtest',
125    ],
126    'export_dependent_settings': [
127      'config',
128      '<(DEPTH)/testing/gmock.gyp:gmock',
129      '<(DEPTH)/testing/gtest.gyp:gtest',
130    ],
131    'direct_dependent_settings': {
132      'variables': {
133        'chromium_code': 1,
134        'clang_warning_flags_unset': [ '-Wglobal-constructors' ],
135      },
136    },
137  }
138  ],
139}
140