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': '../../../../..',
52 # This target sets up defines and includes that are required by WTF and
54 'target_name': 'wtf_config',
56 'msvs_guid': '2E2D3301-2EC4-4C0F-B889-87073B30F673',
57 'direct_dependent_settings': {
59 # Import features_defines from features.gypi
60 '<@(feature_defines)',
62 # Turns on #if PLATFORM(CHROMIUM)
63 'BUILDING_CHROMIUM__=1',
64 # Controls wtf/FastMalloc
65 # FIXME: consider moving into config.h
66 'USE_SYSTEM_MALLOC=1',
72 '_CRT_SECURE_NO_DEPRECATE',
73 '_SCL_SECURE_NO_DEPRECATE',
82 # Use USE_NEW_THEME on Mac.
83 'WTF_USE_NEW_THEME=1',
86 ['OS=="linux" or OS=="freebsd"', {
97 'msvs_guid': 'AA8A5A85-592B-4357-BC60-E0E91E026AF6',
100 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
101 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
109 '<@(javascriptcore_publicheader_files)',
110 '<@(javascriptcore_privateheader_files)',
111 '<@(javascriptcore_files)',
114 # First exclude everything ...
116 # ... Then include what we want.
117 ['include', '../wtf/'],
118 # FIXME: This is clearly not sustainable.
119 ['exclude', '../wtf/android'],
120 ['exclude', '../wtf/brew'],
121 ['exclude', '../wtf/efl'],
122 ['exclude', '../wtf/gobject'],
123 ['exclude', '../wtf/gtk'],
124 ['exclude', '../wtf/haiku'],
125 ['exclude', '../wtf/mac'],
126 ['exclude', '../wtf/qt'],
127 ['exclude', '../wtf/url'],
128 ['exclude', '../wtf/wince'],
129 ['exclude', '../wtf/wx'],
130 ['exclude', '../wtf/unicode/brew'],
131 ['exclude', '../wtf/unicode/wince'],
132 ['exclude', '../wtf/unicode/glib'],
133 ['exclude', '../wtf/unicode/qt4'],
134 # GLib/GTK, even though its name doesn't really indicate.
135 ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'],
136 ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx|Efl|Symbian)\\.(cpp|mm)$'],
137 ['exclude', 'wtf/CurrentTime\\.cpp$'],
138 ['exclude', 'wtf/OSRandomSource\\.cpp$'],
139 ['exclude', 'wtf/MainThread.cpp$'],
140 ['exclude', 'wtf/TC.*\\.(cpp|h)$'],
142 'direct_dependent_settings': {
147 # Some warnings occur in JSC headers, so they must also be disabled
148 # in targets that use JSC.
149 'msvs_disabled_warnings': [
150 # Don't complain about calling specific versions of templatized
151 # functions (e.g. in RefPtrHashMap.h).
153 # Don't complain about using "this" in an initializer list
154 # (e.g. in StringImpl.h).
158 'export_dependent_settings': [
160 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
161 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
163 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706],
167 ['exclude', 'ThreadIdentifierDataPthreads\\.(h|cpp)$'],
168 ['exclude', 'ThreadingPthreads\\.cpp$'],
169 ['include', 'Thread(ing|Specific)Win\\.cpp$'],
170 ['exclude', 'OSAllocatorPosix\\.cpp$'],
171 ['include', 'OSAllocatorWin\\.cpp$']
174 '<(SHARED_INTERMEDIATE_DIR)/webkit',
177 ['inside_chromium_build==1 and component=="shared_library"', {
178 # Chromium windows multi-dll build enables c++ exception and this
179 # causes wtf generates 4291 warning due to operator new/delete
180 # implementations. Disable the warning for chromium windows
182 'msvs_disabled_warnings': [4291],
183 'direct_dependent_settings': {
184 'msvs_disabled_warnings': [4291],
192 'target_name': 'yarr',
193 'type': '<(library)',
199 'dependencies': ['<(chromium_src_dir)/build/win/system.gyp:cygwin'],
202 'msvs_guid': '49909552-0B0C-4C14-8CF6-DB8A2ADE0934',
205 'action_name': 'retgen',
207 '../create_regex_tables',
213 '<(INTERMEDIATE_DIR)/RegExpJitTables.h',
215 'action': ['python', '<@(_inputs)', '<@(_arguments)', '<@(_outputs)'],
218 'action_name': 'klgen',
220 '../KeywordLookupGenerator.py',
221 '../parser/Keywords.table'
226 '<(INTERMEDIATE_DIR)/KeywordLookup.h',
228 'action': ['python', '<@(_inputs)', '<@(_arguments)', '<@(_outputs)'],
232 '<(INTERMEDIATE_DIR)',
236 '<@(javascriptcore_files)',
239 # First exclude everything ...
241 # ... Then include what we want.
242 ['include', '../yarr/'],
243 # The Yarr JIT isn't used in WebCore.
244 ['exclude', '../yarr/YarrJIT\\.(h|cpp)$'],
246 'export_dependent_settings': [