OLD | NEW |
1 # | 1 # |
2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 # | 29 # |
30 | 30 |
31 { | 31 { |
32 'includes': [ | 32 'includes': [ |
33 '../WebKit/chromium/WinPrecompile.gypi', | 33 '../WebKit/chromium/WinPrecompile.gypi', |
34 '../WebKit/chromium/features.gypi', | |
35 '../core/core.gypi', | |
36 '../modules/modules.gypi', | |
37 'bindings.gypi', | 34 'bindings.gypi', |
38 ], | 35 ], |
39 | |
40 'variables': { | |
41 # If set to 1, doesn't compile debug symbols into webcore reducing the | |
42 # size of the binary and increasing the speed of gdb. gcc only. | |
43 'remove_webcore_debug_symbols%': 0, | |
44 | |
45 'bindings_idl_files': [ | |
46 '<@(webcore_idl_files)', | |
47 '<@(modules_idl_files)', | |
48 ], | |
49 | |
50 'bindings_idl_files!': [ | |
51 # Custom bindings in bindings/v8/custom exist for these. | |
52 '../core/dom/EventListener.idl', | |
53 | |
54 '../core/page/AbstractView.idl', | |
55 | |
56 # These bindings are excluded, as they're only used through inheritance an
d don't define constants that would need a constructor. | |
57 '../core/svg/ElementTimeControl.idl', | |
58 '../core/svg/SVGExternalResourcesRequired.idl', | |
59 '../core/svg/SVGFilterPrimitiveStandardAttributes.idl', | |
60 '../core/svg/SVGFitToViewBox.idl', | |
61 '../core/svg/SVGLangSpace.idl', | |
62 '../core/svg/SVGLocatable.idl', | |
63 '../core/svg/SVGTests.idl', | |
64 '../core/svg/SVGTransformable.idl', | |
65 | |
66 # FIXME: I don't know why these are excluded, either. | |
67 # Someone (me?) should figure it out and add appropriate comments. | |
68 '../core/css/CSSUnknownRule.idl', | |
69 ], | |
70 | |
71 'conditions': [ | |
72 ['enable_svg!=0', { | |
73 'bindings_idl_files': [ | |
74 '<@(webcore_svg_idl_files)', | |
75 ], | |
76 }], | |
77 ['OS=="win" and buildtype=="Official"', { | |
78 # On windows official release builds, we try to preserve symbol space. | |
79 'derived_sources_aggregate_files': [ | |
80 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp', | |
81 ], | |
82 },{ | |
83 'derived_sources_aggregate_files': [ | |
84 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp', | |
85 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp', | |
86 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp', | |
87 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp', | |
88 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp', | |
89 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp', | |
90 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp', | |
91 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp', | |
92 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp', | |
93 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp', | |
94 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp', | |
95 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp', | |
96 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp', | |
97 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp', | |
98 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp', | |
99 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp', | |
100 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp', | |
101 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp', | |
102 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp', | |
103 ], | |
104 }], | |
105 ], | |
106 }, | |
107 | |
108 'target_defaults': { | 36 'target_defaults': { |
109 'variables': { | 37 'variables': { |
110 'optimize': 'max', | 38 'optimize': 'max', |
111 }, | 39 }, |
112 }, | 40 }, |
113 | |
114 'conditions': [ | |
115 ['OS!="win" and remove_webcore_debug_symbols==1', { | |
116 # Remove -g from all targets defined here. | |
117 'target_defaults': { | |
118 'cflags!': ['-g'], | |
119 }, | |
120 }], | |
121 ['os_posix==1 and OS!="mac" and gcc_version>=46', { | |
122 'target_defaults': { | |
123 # Disable warnings about c++0x compatibility, as some names (such as nul
lptr) conflict | |
124 # with upcoming c++0x types. | |
125 'cflags_cc': ['-Wno-c++0x-compat'], | |
126 }, | |
127 }], | |
128 ['OS=="linux" and target_arch=="arm"', { | |
129 # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRom
an.unstatic.3258 | |
130 # and colorTransparent.unstatic.4879. | |
131 'target_defaults': { | |
132 'cflags': ['-Wno-uninitialized'], | |
133 }, | |
134 }], | |
135 ['clang==1', { | |
136 'target_defaults': { | |
137 'cflags': ['-Wglobal-constructors', '-Wunused-parameter'], | |
138 'xcode_settings': { | |
139 'WARNING_CFLAGS': ['-Wglobal-constructors', '-Wunused-parameter'], | |
140 }, | |
141 }, | |
142 }], | |
143 ], | |
144 'targets': [{ | 41 'targets': [{ |
145 'target_name': 'supplemental_dependencies', | |
146 'type': 'none', | |
147 'actions': [{ | |
148 'action_name': 'generateSupplementalDependency', | |
149 'variables': { | |
150 # Write sources into a file, so that the action command line won't | |
151 # exceed OS limits. | |
152 'idl_files_list': '<|(idl_files_list.tmp <@(bindings_idl_files))', | |
153 }, | |
154 'inputs': [ | |
155 'scripts/preprocess-idls.pl', | |
156 '<(idl_files_list)', | |
157 '<!@(cat <(idl_files_list))', | |
158 ], | |
159 'outputs': [ | |
160 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp', | |
161 ], | |
162 'msvs_cygwin_shell': 0, | |
163 'action': [ | |
164 '<(perl_exe)', | |
165 '-w', | |
166 '-Iscripts', | |
167 '-I../core/scripts', | |
168 'scripts/preprocess-idls.pl', | |
169 '--defines', | |
170 '<(feature_defines)', | |
171 '--idlFilesList', | |
172 '<(idl_files_list)', | |
173 '--supplementalDependencyFile', | |
174 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp', | |
175 ], | |
176 'message': 'Resolving [Supplemental=XXX] dependencies in all IDL files', | |
177 }] | |
178 }, | |
179 { | |
180 'target_name': 'bindings_sources', | |
181 'type': 'none', | |
182 'hard_dependency': 1, | |
183 'dependencies': [ | |
184 'supplemental_dependencies', | |
185 ], | |
186 'sources': [ | |
187 '<@(bindings_idl_files)', | |
188 '<@(webcore_test_support_idl_files)', | |
189 ], | |
190 'actions': [{ | |
191 'action_name': 'derived_sources_all_in_one', | |
192 'inputs': [ | |
193 '../core/core.gyp/scripts/action_derivedsourcesallinone.py', | |
194 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp', | |
195 ], | |
196 'outputs': [ | |
197 '<@(derived_sources_aggregate_files)', | |
198 ], | |
199 'action': [ | |
200 'python', | |
201 '../core/core.gyp/scripts/action_derivedsourcesallinone.py', | |
202 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp', | |
203 '--', | |
204 '<@(derived_sources_aggregate_files)', | |
205 ], | |
206 }], | |
207 'rules': [{ | |
208 'rule_name': 'binding', | |
209 'extension': 'idl', | |
210 'msvs_external_rule': 1, | |
211 'inputs': [ | |
212 'scripts/generate-bindings.pl', | |
213 'scripts/CodeGenerator.pm', | |
214 'scripts/CodeGeneratorV8.pm', | |
215 'scripts/IDLParser.pm', | |
216 'scripts/IDLAttributes.txt', | |
217 '../core/scripts/preprocessor.pm', | |
218 '<!@pymod_do_main(supplemental_idl_files <@(bindings_idl_files))', | |
219 ], | |
220 'outputs': [ | |
221 # FIXME: The .cpp file should be in webkit/bindings once | |
222 # we coax GYP into supporting it (see 'action' below). | |
223 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8<(RULE_INPUT_ROOT).cpp'
, | |
224 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h', | |
225 ], | |
226 'variables': { | |
227 'generator_include_dirs': [ | |
228 '--include', '../modules/filesystem', | |
229 '--include', '../modules/indexeddb', | |
230 '--include', '../modules/mediasource', | |
231 '--include', '../modules/mediastream', | |
232 '--include', '../modules/navigatorcontentutils', | |
233 '--include', '../modules/notifications', | |
234 '--include', '../modules/webaudio', | |
235 '--include', '../modules/webdatabase', | |
236 '--include', '../core/css', | |
237 '--include', '../core/dom', | |
238 '--include', '../core/fileapi', | |
239 '--include', '../core/html', | |
240 '--include', '../core/page', | |
241 '--include', '../core/plugins', | |
242 '--include', '../core/storage', | |
243 '--include', '../core/svg', | |
244 '--include', '../core/testing', | |
245 '--include', '../core/workers', | |
246 '--include', '../core/xml', | |
247 '--include', '<(SHARED_INTERMEDIATE_DIR)/webkit', | |
248 ], | |
249 }, | |
250 'msvs_cygwin_shell': 0, | |
251 # FIXME: Note that we put the .cpp files in webcore/bindings | |
252 # but the .h files in webkit/bindings. This is to work around | |
253 # the unfortunate fact that GYP strips duplicate arguments | |
254 # from lists. When we have a better GYP way to suppress that | |
255 # behavior, change the output location. | |
256 'action': [ | |
257 '<(perl_exe)', | |
258 '-w', | |
259 '-Iscripts', | |
260 '-I../core/scripts', | |
261 '<(bindings_dir)/scripts/generate-bindings.pl', | |
262 '--outputHeadersDir', | |
263 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', | |
264 '--outputDir', | |
265 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings', | |
266 '--idlAttributesFile', | |
267 'scripts/IDLAttributes.txt', | |
268 '--defines', | |
269 '<(feature_defines)', | |
270 '<@(generator_include_dirs)', | |
271 '--supplementalDependencyFile', | |
272 '<(SHARED_INTERMEDIATE_DIR)/supplemental_dependency.tmp', | |
273 '--additionalIdlFiles', | |
274 '<(webcore_test_support_idl_files)', | |
275 '<(RULE_INPUT_PATH)', | |
276 '<@(preprocessor)', | |
277 ], | |
278 'message': 'Generating binding from <(RULE_INPUT_PATH)', | |
279 }], | |
280 }, | |
281 { | |
282 'target_name': 'bindings', | 42 'target_name': 'bindings', |
283 'type': 'static_library', | 43 'type': 'static_library', |
284 'hard_dependency': 1, | 44 'hard_dependency': 1, |
285 'dependencies': [ | 45 'dependencies': [ |
286 'bindings_sources', | 46 '../config.gyp:config', |
287 '../core/core.gyp/core.gyp:webcore_prerequisites', | 47 '../wtf/wtf.gyp:wtf', |
288 '../yarr/yarr.gyp:yarr', | 48 '../yarr/yarr.gyp:yarr', |
289 '../wtf/wtf.gyp:wtf', | 49 '../core/core.gyp/core.gyp:webcore', |
290 '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', | 50 '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', |
291 '<(DEPTH)/skia/skia.gyp:skia', | 51 '<(DEPTH)/skia/skia.gyp:skia', |
292 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg', | 52 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg', |
293 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', | 53 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng', |
294 '<(DEPTH)/third_party/libxml/libxml.gyp:libxml', | 54 '<(DEPTH)/third_party/libxml/libxml.gyp:libxml', |
295 '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt', | 55 '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt', |
296 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp', | 56 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp', |
297 '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', | 57 '<(DEPTH)/third_party/npapi/npapi.gyp:npapi', |
298 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms', | 58 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms', |
299 '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', | 59 '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', |
300 '<(DEPTH)/third_party/v8-i18n/build/all.gyp:v8-i18n', | 60 '<(DEPTH)/third_party/v8-i18n/build/all.gyp:v8-i18n', |
301 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', | 61 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', |
302 '<(libjpeg_gyp_path):libjpeg', | 62 '<(libjpeg_gyp_path):libjpeg', |
303 ], | 63 ], |
304 'include_dirs': [ | 64 'include_dirs': [ |
305 '<(INTERMEDIATE_DIR)', | |
306 # FIXME: Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we | 65 # FIXME: Remove <(SHARED_INTERMEDIATE_DIR)/webcore when we |
307 # can entice gyp into letting us put both the .cpp and .h | 66 # can entice gyp into letting us put both the .cpp and .h |
308 # files in the same output directory. | 67 # files in the same output directory. |
309 '<(SHARED_INTERMEDIATE_DIR)/webcore', | 68 '<(SHARED_INTERMEDIATE_DIR)/webcore', |
310 '<(SHARED_INTERMEDIATE_DIR)/webkit', | |
311 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', | |
312 ], | 69 ], |
313 'xcode_settings': { | 70 'xcode_settings': { |
314 # Some Mac-specific parts of WebKit won't compile without having this | 71 # Some Mac-specific parts of WebKit won't compile without having this |
315 # prefix header injected. | 72 # prefix header injected. |
316 # FIXME: make this a first-class setting. | 73 # FIXME: make this a first-class setting. |
317 'GCC_PREFIX_HEADER': '../core/WebCorePrefix.h', | 74 'GCC_PREFIX_HEADER': '../core/WebCorePrefix.h', |
318 }, | 75 }, |
319 'direct_dependent_settings': { | |
320 'include_dirs': [ | |
321 '<(SHARED_INTERMEDIATE_DIR)/webkit', | |
322 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', | |
323 ], | |
324 }, | |
325 'sources': [ | 76 'sources': [ |
326 '<@(derived_sources_aggregate_files)', | 77 '<@(derived_sources_aggregate_files)', |
327 '<@(bindings_files)', | 78 '<@(bindings_files)', |
328 ], | 79 ], |
329 'conditions': [ | 80 'conditions': [ |
330 ['OS=="win" and component=="shared_library"', { | |
331 'defines': [ | |
332 'USING_V8_SHARED', | |
333 ], | |
334 }], | |
335 ['OS=="win"', { | 81 ['OS=="win"', { |
336 'defines': [ | |
337 '__PRETTY_FUNCTION__=__FUNCTION__', | |
338 ], | |
339 # This is needed because Event.h in this directory is blocked | 82 # This is needed because Event.h in this directory is blocked |
340 # by a system header on windows. | 83 # by a system header on windows. |
341 'include_dirs++': ['../core/dom'], | 84 'include_dirs++': ['../core/dom'], |
342 'direct_dependent_settings': { | 85 'direct_dependent_settings': { |
343 'include_dirs+++': ['../core/dom'], | 86 'include_dirs+++': ['../core/dom'], |
344 }, | 87 }, |
345 # In generated bindings code: 'switch contains default but no case'. | 88 # In generated bindings code: 'switch contains default but no case'. |
346 # Disable c4267 warnings until we fix size_t to int truncations. | 89 # Disable c4267 warnings until we fix size_t to int truncations. |
347 'msvs_disabled_warnings': [ 4065, 4267 ], | 90 'msvs_disabled_warnings': [ 4065, 4267 ], |
348 }], | 91 }], |
349 ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_def
ines', { | 92 ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_def
ines', { |
350 'cflags': [ | 93 'cflags': [ |
351 '<!@(pkg-config --cflags-only-I ipp)', | 94 '<!@(pkg-config --cflags-only-I ipp)', |
352 ], | 95 ], |
353 }], | 96 }], |
354 ], | 97 ], |
355 }, | 98 }, |
356 ], | 99 ], |
357 } | 100 } |
OLD | NEW |