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

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: Created 6 years, 10 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
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:
35 # https://sites.google.com/a/chromium.org/dev/developers/design-documents/idl-bu ild
36
31 { 37 {
32 'includes': [ 38 'includes': [
33 '../build/scripts/scripts.gypi', 39 '../build/scripts/scripts.gypi',
34 '../build/win/precompile.gypi', 40 '../build/win/precompile.gypi',
35 '../build/scripts/scripts.gypi', 41 '../build/scripts/scripts.gypi',
36 '../core/core.gypi', 42 '../core/core.gypi',
37 '../modules/modules.gypi', 43 '../modules/modules.gypi',
38 'bindings.gypi', 44 'bindings.gypi',
39 ], 45 ],
40 46
41 'variables': { 47 'variables': {
42 # For details, see: http://www.chromium.org/developers/web-idl-interfaces 48 # For details, see: http://www.chromium.org/developers/web-idl-interfaces
43 # 49 #
44 # Interface IDL files / Dependency IDL files 50 # Interface IDL files / Dependency IDL files
45 # Interface IDL files: generate individual bindings (includes testing) 51 # Interface IDL files: generate individual bindings (includes testing)
46 'interface_idl_files': [ 52 'interface_idl_files': [
47 '<@(static_interface_idl_files)', 53 '<@(static_interface_idl_files)',
48 '<@(generated_interface_idl_files)', 54 '<@(generated_interface_idl_files)',
49 ], 55 ],
50 # Dependency IDL files: don't generate individual bindings, but do process 56 # Dependency IDL files: don't generate individual bindings, but do process
51 # in IDL dependency computation, and count as build dependencies 57 # in IDL dependency computation, and count as build dependencies
52 'dependency_idl_files': [ 58 'dependency_idl_files': [
53 '<@(static_dependency_idl_files)', 59 '<@(static_dependency_idl_files)',
54 '<@(generated_dependency_idl_files)', 60 '<@(generated_dependency_idl_files)',
55 ], 61 ],
56 # Include in aggregate bindings (exclude testing) 62 # Main interface IDL files (excluding dependencies and testing)
57 # The only differences for testing files are: 63 # 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': [ 64 'main_interface_idl_files': [
62 '<@(core_idl_files)', 65 '<@(core_idl_files)',
63 '<@(modules_idl_files)', 66 '<@(modules_idl_files)',
64 ], 67 ],
65 68
66 # Static IDL files / Generated IDL files 69 # Static IDL files / Generated IDL files
67 # Paths need to be passed separately for static and generated files, as 70 # 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 71 # 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 72 # 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 73 # not present at GYP time, when the temporary file is generated
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 }, 172 },
170 173
171 'targets': [{ 174 'targets': [{
172 'target_name': 'global_constructors_idls', 175 'target_name': 'global_constructors_idls',
173 'type': 'none', 176 'type': 'none',
174 'actions': [{ 177 'actions': [{
175 'action_name': 'generate_global_constructors_idls', 178 'action_name': 'generate_global_constructors_idls',
176 'variables': { 179 'variables': {
177 # Write list of IDL files to a file, so that the command line doesn't 180 # Write list of IDL files to a file, so that the command line doesn't
178 # exceed OS length limits. 181 # exceed OS length limits.
179 'idl_files_list': '<|(idl_files_list.tmp <@(static_idl_files))', 182 # Only includes main IDL files (exclude dependencies and testing,
183 # which should not appear on global objects).
184 'main_interface_idl_files_list': '<|(main_interface_idl_files_list.tmp < @(main_interface_idl_files))',
180 }, 185 },
181 'inputs': [ 186 'inputs': [
182 'scripts/generate_global_constructors.py', 187 'scripts/generate_global_constructors.py',
183 'scripts/utilities.py', 188 'scripts/utilities.py',
184 '<(idl_files_list)', 189 '<(main_interface_idl_files_list)',
185 '<@(static_idl_files)', 190 '<@(main_interface_idl_files)',
186 ], 191 ],
187 'outputs': [ 192 'outputs': [
188 '<@(generated_global_constructors_idl_files)', 193 '<@(generated_global_constructors_idl_files)',
189 ], 194 ],
190 'action': [ 195 'action': [
191 'python', 196 'python',
192 'scripts/generate_global_constructors.py', 197 'scripts/generate_global_constructors.py',
193 '--idl-files-list', 198 '--idl-files-list',
194 '<(idl_files_list)', 199 '<(main_interface_idl_files_list)',
195 '<@(write_file_only_if_changed)', 200 '<@(write_file_only_if_changed)',
196 '--window-constructors-file', 201 '--',
202 'Window',
197 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl', 203 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl',
198 '--workerglobalscope-constructors-file', 204 'WorkerGlobalScope',
199 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl', 205 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl',
200 '--sharedworkerglobalscope-constructors-file', 206 'SharedWorkerGlobalScope',
201 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.id l', 207 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.id l',
202 '--dedicatedworkerglobalscope-constructors-file', 208 'DedicatedWorkerGlobalScope',
203 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors .idl', 209 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors .idl',
204 '--serviceworkerglobalscope-constructors-file', 210 'ServiceWorkerGlobalScope',
205 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl', 211 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl',
206 ], 212 ],
207 'message': 'Generating IDL files for constructors on global objects', 213 'message': 'Generating IDL files for constructors on global objects',
208 }] 214 }]
209 }, 215 },
210 { 216 {
211 'target_name': 'interfaces_info', 217 'target_name': 'interfaces_info',
212 'type': 'none', 218 'type': 'none',
213 'dependencies': [ 219 'dependencies': [
214 'global_constructors_idls', 220 'global_constructors_idls',
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 # [ImplementedAs]) changes, we rebuild all files, since we're not 287 # [ImplementedAs]) changes, we rebuild all files, since we're not
282 # computing dependencies file-by-file in the build. 288 # computing dependencies file-by-file in the build.
283 # This data is generally stable. 289 # This data is generally stable.
284 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt', 290 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt',
285 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle', 291 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle',
286 # Further, if any dependency (partial interface or implemented 292 # Further, if any dependency (partial interface or implemented
287 # interface) changes, rebuild everything, since every IDL potentially 293 # interface) changes, rebuild everything, since every IDL potentially
288 # depends on them, because we're not computing dependencies 294 # depends on them, because we're not computing dependencies
289 # file-by-file. 295 # file-by-file.
290 # FIXME: This is too conservative, and causes excess rebuilds: 296 # FIXME: This is too conservative, and causes excess rebuilds:
291 # compute this file-by-file. 297 # compute this file-by-file. http://crbug.com/341748
292 '<@(dependency_idl_files)', 298 '<@(dependency_idl_files)',
293 ], 299 ],
294 'outputs': [ 300 'outputs': [
295 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp', 301 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp',
296 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h', 302 '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h',
297 ], 303 ],
298 'variables': { 304 'variables': {
299 # IDL include paths. The generator will search recursively for IDL 305 # IDL include paths. The generator will search recursively for IDL
300 # files under these locations. 306 # files under these locations.
301 'generator_include_dirs': [ 307 'generator_include_dirs': [
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 { 367 {
362 'target_name': 'generated_bindings', 368 'target_name': 'generated_bindings',
363 'type': 'none', 369 'type': 'none',
364 'dependencies': [ 370 'dependencies': [
365 'aggregate_generated_bindings', 371 'aggregate_generated_bindings',
366 'individual_generated_bindings', 372 'individual_generated_bindings',
367 ], 373 ],
368 }, 374 },
369 ], 375 ],
370 } 376 }
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/compute_interfaces_info.py » ('j') | Source/bindings/scripts/compute_interfaces_info.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698