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

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

Issue 174953005: Clean up compute_interfaces_info.py and generate_global_constructors.py (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 9 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
« no previous file with comments | « no previous file | Source/bindings/scripts/compute_interfaces_info.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10 matching lines...) Expand all
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
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 # Generate IDL bindings, together with auxiliary files
32 # (constructors on global objects, aggregate bindings files).
33 #
34 # Design doc: http://www.chromium.org/developers/design-documents/idl-build
35
31 { 36 {
32 'includes': [ 37 'includes': [
33 '../build/scripts/scripts.gypi', 38 '../build/scripts/scripts.gypi',
34 '../build/win/precompile.gypi', 39 '../build/win/precompile.gypi',
35 '../build/scripts/scripts.gypi', 40 '../build/scripts/scripts.gypi',
36 '../core/core.gypi', 41 '../core/core.gypi',
37 '../modules/modules.gypi', 42 '../modules/modules.gypi',
38 'bindings.gypi', 43 'bindings.gypi',
39 ], 44 ],
40 45
41 'variables': { 46 'variables': {
42 # For details, see: http://www.chromium.org/developers/web-idl-interfaces 47 # For details, see: http://www.chromium.org/developers/web-idl-interfaces
43 # 48 #
44 # Interface IDL files / Dependency IDL files 49 # Interface IDL files / Dependency IDL files
45 # Interface IDL files: generate individual bindings (includes testing) 50 # Interface IDL files: generate individual bindings (includes testing)
46 'interface_idl_files': [ 51 'interface_idl_files': [
47 '<@(static_interface_idl_files)', 52 '<@(static_interface_idl_files)',
48 '<@(generated_interface_idl_files)', 53 '<@(generated_interface_idl_files)',
49 ], 54 ],
50 # Dependency IDL files: don't generate individual bindings, but do process 55 # Dependency IDL files: don't generate individual bindings, but do process
51 # in IDL dependency computation, and count as build dependencies 56 # in IDL dependency computation, and count as build dependencies
52 'dependency_idl_files': [ 57 'dependency_idl_files': [
53 '<@(static_dependency_idl_files)', 58 '<@(static_dependency_idl_files)',
54 '<@(generated_dependency_idl_files)', 59 '<@(generated_dependency_idl_files)',
55 ], 60 ],
56 # Include in aggregate bindings (exclude testing) 61 # Main interface IDL files (excluding dependencies and testing)
57 # The only differences for testing files are: 62 # are included as properties on global objects, and in aggregate bindings
58 # * They are not included in aggregate bindings (excluded from below list)
59 # * They do not appear as a property on the global object (Window):
60 # specify [NoInterfaceObject] on the interface in the .idl file
61 'main_interface_idl_files': [ 63 'main_interface_idl_files': [
62 '<@(core_idl_files)', 64 '<@(core_idl_files)',
63 '<@(modules_idl_files)', 65 '<@(modules_idl_files)',
64 ], 66 ],
65 67
66 # Static IDL files / Generated IDL files 68 # Static IDL files / Generated IDL files
67 # Paths need to be passed separately for static and generated files, as 69 # Paths need to be passed separately for static and generated files, as
68 # static files are listed in a temporary file (b/c too long for command 70 # static files are listed in a temporary file (b/c too long for command
69 # line), but generated files must be passed at the command line, as they are 71 # line), but generated files must be passed at the command line, as they are
70 # not present at GYP time, when the temporary file is generated 72 # not present at GYP time, when the temporary file is generated
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 }, 170 },
169 171
170 'targets': [{ 172 'targets': [{
171 'target_name': 'global_constructors_idls', 173 'target_name': 'global_constructors_idls',
172 'type': 'none', 174 'type': 'none',
173 'actions': [{ 175 'actions': [{
174 'action_name': 'generate_global_constructors_idls', 176 'action_name': 'generate_global_constructors_idls',
175 'variables': { 177 'variables': {
176 # Write list of IDL files to a file, so that the command line doesn't 178 # Write list of IDL files to a file, so that the command line doesn't
177 # exceed OS length limits. 179 # exceed OS length limits.
178 'idl_files_list': '<|(idl_files_list.tmp <@(static_idl_files))', 180 # Only includes main IDL files (exclude dependencies and testing,
181 # which should not appear on global objects).
182 'main_interface_idl_files_list': '<|(main_interface_idl_files_list.tmp < @(main_interface_idl_files))',
179 }, 183 },
180 'inputs': [ 184 'inputs': [
181 'scripts/generate_global_constructors.py', 185 'scripts/generate_global_constructors.py',
182 'scripts/utilities.py', 186 'scripts/utilities.py',
183 '<(idl_files_list)', 187 '<(main_interface_idl_files_list)',
184 '<@(static_idl_files)', 188 '<@(main_interface_idl_files)',
185 ], 189 ],
186 'outputs': [ 190 'outputs': [
187 '<@(generated_global_constructors_idl_files)', 191 '<@(generated_global_constructors_idl_files)',
188 ], 192 ],
189 'action': [ 193 'action': [
190 'python', 194 'python',
191 'scripts/generate_global_constructors.py', 195 'scripts/generate_global_constructors.py',
192 '--idl-files-list', 196 '--idl-files-list',
193 '<(idl_files_list)', 197 '<(main_interface_idl_files_list)',
194 '<@(write_file_only_if_changed)', 198 '<@(write_file_only_if_changed)',
195 '--window-constructors-file', 199 '--',
200 'Window',
196 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl', 201 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl',
197 '--workerglobalscope-constructors-file', 202 'WorkerGlobalScope',
198 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl', 203 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl',
199 '--sharedworkerglobalscope-constructors-file', 204 'SharedWorkerGlobalScope',
200 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.id l', 205 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.id l',
201 '--dedicatedworkerglobalscope-constructors-file', 206 'DedicatedWorkerGlobalScope',
202 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors .idl', 207 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors .idl',
203 '--serviceworkerglobalscope-constructors-file', 208 'ServiceWorkerGlobalScope',
204 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl', 209 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl',
205 ], 210 ],
206 'message': 'Generating IDL files for constructors on global objects', 211 'message': 'Generating IDL files for constructors on global objects',
207 }] 212 }]
208 }, 213 },
209 { 214 {
210 'target_name': 'interfaces_info', 215 'target_name': 'interfaces_info',
211 'type': 'none', 216 'type': 'none',
212 'dependencies': [ 217 'dependencies': [
213 'global_constructors_idls', 218 'global_constructors_idls',
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 # If the dependency structure or public interface info (e.g., 307 # If the dependency structure or public interface info (e.g.,
303 # [ImplementedAs]) changes, we rebuild all files, since we're not 308 # [ImplementedAs]) changes, we rebuild all files, since we're not
304 # computing dependencies file-by-file in the build. 309 # computing dependencies file-by-file in the build.
305 # This data is generally stable. 310 # This data is generally stable.
306 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle', 311 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle',
307 # Further, if any dependency (partial interface or implemented 312 # Further, if any dependency (partial interface or implemented
308 # interface) changes, rebuild everything, since every IDL potentially 313 # interface) changes, rebuild everything, since every IDL potentially
309 # depends on them, because we're not computing dependencies 314 # depends on them, because we're not computing dependencies
310 # file-by-file. 315 # file-by-file.
311 # FIXME: This is too conservative, and causes excess rebuilds: 316 # FIXME: This is too conservative, and causes excess rebuilds:
312 # compute this file-by-file. 317 # compute this file-by-file. http://crbug.com/341748
313 '<@(dependency_idl_files)', 318 '<@(dependency_idl_files)',
314 ], 319 ],
315 'outputs': [ 320 'outputs': [
316 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp', 321 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp',
317 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h', 322 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h',
318 ], 323 ],
319 # sanitize-win-build-log.sed uses a regex which matches this command 324 # sanitize-win-build-log.sed uses a regex which matches this command
320 # line (Python script + .idl file being processed). 325 # line (Python script + .idl file being processed).
321 # Update that regex if command line changes (other than changing flags) 326 # Update that regex if command line changes (other than changing flags)
322 'action': [ 327 'action': [
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 { 369 {
365 'target_name': 'generated_bindings', 370 'target_name': 'generated_bindings',
366 'type': 'none', 371 'type': 'none',
367 'dependencies': [ 372 'dependencies': [
368 'aggregate_generated_bindings', 373 'aggregate_generated_bindings',
369 'individual_generated_bindings', 374 'individual_generated_bindings',
370 ], 375 ],
371 }, 376 },
372 ], 377 ],
373 } 378 }
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/compute_interfaces_info.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698