2 # Copyright (C) 2009 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
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
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.
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.
33 # FIXME: Sense whether upstream or downstream build, and
34 # include the right features.gypi
35 '../../WebKit/chromium/features.gypi',
36 '../JavaScriptCore.gypi',
39 # Location of the chromium src directory.
41 ['inside_chromium_build==0', {
42 # Webkit is being built outside of the full chromium project.
43 'chromium_src_dir': '../../WebKit/chromium',
45 # WebKit is checked out in src/chromium/third_party/WebKit
46 'chromium_src_dir': '../../../../..',
51 ['os_posix == 1 and OS != "mac" and gcc_version==46', {
53 # Disable warnings about c++0x compatibility, as some names (such as nullptr) conflict
54 # with upcoming c++0x types.
55 'cflags_cc': ['-Wno-c++0x-compat'],
61 # This target sets up defines and includes that are required by WTF and
63 'target_name': 'wtf_config',
65 'msvs_guid': '2E2D3301-2EC4-4C0F-B889-87073B30F673',
66 'direct_dependent_settings': {
68 # Import features_defines from features.gypi
69 '<@(feature_defines)',
71 # Turns on #if PLATFORM(CHROMIUM)
72 'BUILDING_CHROMIUM__=1',
73 # Controls wtf/FastMalloc
74 # FIXME: consider moving into config.h
75 'USE_SYSTEM_MALLOC=1',
81 '_CRT_SECURE_NO_DEPRECATE',
82 '_SCL_SECURE_NO_DEPRECATE',
91 # Use USE_NEW_THEME on Mac.
92 'WTF_USE_NEW_THEME=1',
95 ['os_posix == 1 and OS != "mac"', {
104 'target_name': 'wtf',
105 'type': 'static_library',
106 'msvs_guid': 'AA8A5A85-592B-4357-BC60-E0E91E026AF6',
109 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
110 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
118 '<@(javascriptcore_publicheader_files)',
119 '<@(javascriptcore_privateheader_files)',
120 '<@(javascriptcore_files)',
123 # First exclude everything ...
125 # ... Then include what we want.
126 ['include', '../wtf/'],
127 # FIXME: This is clearly not sustainable.
128 ['exclude', '../wtf/brew'],
129 ['exclude', '../wtf/efl'],
130 ['exclude', '../wtf/gobject'],
131 ['exclude', '../wtf/gtk'],
132 ['exclude', '../wtf/haiku'],
133 ['exclude', '../wtf/mac'],
134 ['exclude', '../wtf/qt'],
135 ['exclude', '../wtf/url'],
136 ['exclude', '../wtf/wince'],
137 ['exclude', '../wtf/wx'],
138 ['exclude', '../wtf/unicode/brew'],
139 ['exclude', '../wtf/unicode/wince'],
140 ['exclude', '../wtf/unicode/glib'],
141 ['exclude', '../wtf/unicode/qt4'],
142 # GLib/GTK, even though its name doesn't really indicate.
143 ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'],
144 ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx|Efl|Symbian)\\.(cpp|mm)$'],
145 ['exclude', 'wtf/CurrentTime\\.cpp$'],
146 ['exclude', 'wtf/OSRandomSource\\.cpp$'],
147 ['exclude', 'wtf/MainThread.cpp$'],
148 ['exclude', 'wtf/TC.*\\.(cpp|h)$'],
150 'direct_dependent_settings': {
155 # Some warnings occur in JSC headers, so they must also be disabled
156 # in targets that use JSC.
157 'msvs_disabled_warnings': [
158 # Don't complain about calling specific versions of templatized
159 # functions (e.g. in RefPtrHashMap.h).
161 # Don't complain about using "this" in an initializer list
162 # (e.g. in StringImpl.h).
166 'export_dependent_settings': [
168 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
169 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
171 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706],
175 ['exclude', 'ThreadIdentifierDataPthreads\\.(h|cpp)$'],
176 ['exclude', 'ThreadingPthreads\\.cpp$'],
177 ['include', 'Thread(ing|Specific)Win\\.cpp$'],
178 ['exclude', 'OSAllocatorPosix\\.cpp$'],
179 ['include', 'OSAllocatorWin\\.cpp$']
182 '<(SHARED_INTERMEDIATE_DIR)/webkit',
185 ['inside_chromium_build==1 and component=="shared_library"', {
186 # Chromium windows multi-dll build enables c++ exception and this
187 # causes wtf generates 4291 warning due to operator new/delete
188 # implementations. Disable the warning for chromium windows
190 'msvs_disabled_warnings': [4291],
191 'direct_dependent_settings': {
192 'msvs_disabled_warnings': [4291],
200 'target_name': 'yarr',
201 'type': 'static_library',
207 'dependencies': ['<(chromium_src_dir)/build/win/system.gyp:cygwin'],
210 'msvs_guid': '49909552-0B0C-4C14-8CF6-DB8A2ADE0934',
213 'action_name': 'retgen',
215 '../create_regex_tables',
221 '<(INTERMEDIATE_DIR)/RegExpJitTables.h',
223 'action': ['python', '<@(_inputs)', '<@(_arguments)', '<@(_outputs)'],
227 '<(INTERMEDIATE_DIR)',
231 '<@(javascriptcore_files)',
234 # First exclude everything ...
236 # ... Then include what we want.
237 ['include', '../yarr/'],
238 # The Yarr JIT isn't used in WebCore.
239 ['exclude', '../yarr/YarrJIT\\.(h|cpp)$'],
241 'export_dependent_settings': [
250 # indent-tabs-mode:nil
252 # vim: set expandtab tabstop=2 shiftwidth=2: