1 # Copyright (C) 2012 Google Inc. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer
11 # in the documentation and/or other materials provided with the
13 # * Neither the name of Google Inc. nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 '../../WebKit/chromium/WinPrecompile.gypi',
31 '../../WebKit/chromium/features.gypi',
35 # Location of the chromium src directory.
37 ['inside_chromium_build==0', {
38 # Webkit is being built outside of the full chromium project.
39 'chromium_src_dir': '../../WebKit/chromium',
41 # WebKit is checked out in src/chromium/third_party/WebKit
42 'chromium_src_dir': '../../../../..',
47 ['os_posix == 1 and OS != "mac" and gcc_version>=46', {
49 # Disable warnings about c++0x compatibility, as some names (such as nullptr) conflict
50 # with upcoming c++0x types.
51 'cflags_cc': ['-Wno-c++0x-compat'],
57 # This target sets up defines and includes that are required by WTF and
59 'target_name': 'wtf_config',
61 'direct_dependent_settings': {
63 # Import features_defines from features.gypi
64 '<@(feature_defines)',
66 # Turns on #if PLATFORM(CHROMIUM)
67 'BUILDING_CHROMIUM__=1',
73 '_CRT_SECURE_NO_DEPRECATE',
74 '_SCL_SECURE_NO_DEPRECATE',
78 '../../JavaScriptCore/os-win32',
83 'WTF_USE_NEW_THEME=1',
86 ['os_posix == 1 and OS != "mac"', {
96 'type': 'static_library',
104 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
105 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
108 '<@(wtf_privateheader_files)',
112 # FIXME: This is clearly not sustainable.
113 ['exclude', '../wtf/efl'],
114 ['exclude', '../wtf/gobject'],
115 ['exclude', '../wtf/gtk'],
116 ['exclude', '../wtf/mac'],
117 ['exclude', '../wtf/qt'],
118 ['exclude', '../wtf/url'],
119 ['exclude', '../wtf/wince'],
120 ['exclude', '../wtf/wx'],
121 ['exclude', '../wtf/unicode/glib'],
122 ['exclude', '../wtf/unicode/qt4'],
123 ['exclude', '../wtf/unicode/wchar'],
124 # GLib/GTK, even though its name doesn't really indicate.
125 ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'],
126 ['exclude', '(Default|Gtk|Mac|None|Qt|Win|Wx|Efl)\\.(cpp|mm)$'],
127 ['exclude', 'wtf/OSRandomSource\\.cpp$'],
128 ['exclude', 'wtf/MainThread.cpp$'],
129 ['exclude', 'wtf/MetaAllocator\\.(cpp|h)$'],
131 'direct_dependent_settings': {
134 # FIXME: This is too broad, but is needed for runtime/JSExportMacros.h and yarr.
135 '../../JavaScriptCore',
137 # Some warnings occur in JSC headers, so they must also be disabled
138 # in targets that use JSC.
139 'msvs_disabled_warnings': [
140 # Don't complain about calling specific versions of templatized
141 # functions (e.g. in RefPtrHashMap.h).
143 # Don't complain about using "this" in an initializer list
144 # (e.g. in StringImpl.h).
146 # Disable c4267 warnings until we fix size_t to int truncations.
150 'export_dependent_settings': [
152 '<(chromium_src_dir)/third_party/icu/icu.gyp:icui18n',
153 '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
155 # Disable c4267 warnings until we fix size_t to int truncations.
156 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
160 ['exclude', 'ThreadIdentifierDataPthreads\\.(h|cpp)$'],
161 ['exclude', 'ThreadingPthreads\\.cpp$'],
162 ['include', 'Thread(ing|Specific)Win\\.cpp$'],
163 ['exclude', 'OSAllocatorPosix\\.cpp$'],
164 ['include', 'OSAllocatorWin\\.cpp$'],
165 ['include', 'win/OwnPtrWin\\.cpp$'],
168 '<(SHARED_INTERMEDIATE_DIR)/webkit',
171 ['inside_chromium_build==1 and component=="shared_library"', {
172 # Chromium windows multi-dll build enables c++ exception and this
173 # causes wtf generates 4291 warning due to operator new/delete
174 # implementations. Disable the warning for chromium windows
176 'msvs_disabled_warnings': [4291],
177 'direct_dependent_settings': {
178 'msvs_disabled_warnings': [4291],
185 # mac is the only OS that uses WebKit's copy of TCMalloc.
186 ['exclude', 'wtf/TC.*\\.(cpp|h)$'],