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