Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / config.gyp
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     # Set to 1 to enable the clang plugin that checks the usage of the Blink
36     # garbage-collection infrastructure during compilation.
37     # Requires building locally since GOMA doesn't yet support the plugin.
38     'enable_oilpan%': 0,
39     'blink_gc_plugin%': 0,
40   },
41   'targets': [
42   {
43     'target_name': 'config',
44     'type': 'none',
45     'direct_dependent_settings': {
46       'include_dirs': [
47         '.',
48         '..',
49       ],
50       'msvs_disabled_warnings': [
51         4305, 4324, 4714, 4800, 4996,
52       ],
53       'variables': {
54         'chromium_code': 1,
55       },
56       'conditions': [
57         ['OS=="win" and component=="shared_library"', {
58           'defines': [
59             'USING_V8_SHARED',
60           ],
61         }],
62         ['OS=="win"', {
63           'sources/': [
64             ['exclude', 'Posix\\.cpp$'],
65           ],
66         },{ # OS!="win"
67           'sources/': [
68             ['exclude', 'Win\\.cpp$'],
69           ],
70         }],
71         ['OS!="mac"', {
72           'sources/': [
73             ['exclude', 'Mac\\.mm$'],
74           ],
75         }],
76         ['<(toolkit_uses_gtk) != 1', {
77             'sources/': [
78               ['exclude', 'Gtk\\.cpp$']
79             ]
80         }],
81         ['OS!="android"', {
82           'sources/': [
83             ['exclude', 'Android\\.cpp$'],
84           ],
85         }],
86         ['OS!="win" and remove_webcore_debug_symbols==1', {
87           # Remove -g from all targets defined here.
88           'cflags!': ['-g'],
89         }],
90         ['gcc_version>=46', {
91           # Disable warnings about c++0x compatibility, as some names (such as
92           # nullptr) conflict with upcoming c++0x types.
93           'cflags_cc': ['-Wno-c++0x-compat'],
94         }],
95         ['OS=="linux" and target_arch=="arm"', {
96           # Due to a bug in gcc arm, we get warnings about uninitialized
97           # timesNewRoman.unstatic.3258 and colorTransparent.unstatic.4879.
98           'cflags': ['-Wno-uninitialized'],
99         }],
100         ['clang==1', {
101           'cflags': ['-Wglobal-constructors'],
102           'xcode_settings': {
103             'WARNING_CFLAGS': ['-Wglobal-constructors'],
104           },
105         }],
106         # Only enable the blink_gc_plugin when using clang and chrome plugins.
107         ['blink_gc_plugin==1 and clang==1 and clang_use_chrome_plugins==1', {
108           'cflags': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan))'],
109         }],
110       ],
111     },
112   },
113   {
114     'target_name': 'unittest_config',
115     'type': 'none',
116     'dependencies': [
117       'config',
118       '<(DEPTH)/testing/gmock.gyp:gmock',
119       '<(DEPTH)/testing/gtest.gyp:gtest',
120     ],
121     'export_dependent_settings': [
122       'config',
123       '<(DEPTH)/testing/gmock.gyp:gmock',
124       '<(DEPTH)/testing/gtest.gyp:gtest',
125     ],
126     'direct_dependent_settings': {
127       'cflags!': ['-Wglobal-constructors'],
128       'xcode_settings': {
129         'WARNING_CFLAGS!': ['-Wglobal-constructors'],
130       },
131     },
132   }
133   ],
134 }