Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: Source/bindings/bindings.gyp

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

Powered by Google App Engine
This is Rietveld 408576698