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

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

Issue 173503009: Split generate_global_constructors.py from compute_interfaces_info.py (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: [NoHeader] 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 # Paths need to be passed separately for static and generated files, as 67 # 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 68 # 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 69 # 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 70 # not present at GYP time, when the temporary file is generated
71 'static_idl_files': [ 71 'static_idl_files': [
72 '<@(static_interface_idl_files)', 72 '<@(static_interface_idl_files)',
73 '<@(static_dependency_idl_files)', 73 '<@(static_dependency_idl_files)',
74 ], 74 ],
75 'generated_idl_files': [ 75 'generated_idl_files': [
76 '<@(generated_interface_idl_files)', 76 '<@(generated_interface_idl_files)',
77 # FIXME: generate global constructors *before* computing dependencies 77 '<@(generated_dependency_idl_files)',
78 # '<@(generated_dependency_idl_files)',
79 ], 78 ],
80 79
81 # Static IDL files 80 # Static IDL files
82 'static_interface_idl_files': [ 81 'static_interface_idl_files': [
83 '<@(core_idl_files)', 82 '<@(core_idl_files)',
84 '<@(webcore_testing_idl_files)', 83 '<@(webcore_testing_idl_files)',
85 '<@(modules_idl_files)', 84 '<@(modules_idl_files)',
86 ], 85 ],
87 'static_dependency_idl_files': [ 86 'static_dependency_idl_files': [
88 '<@(core_dependency_idl_files)', 87 '<@(core_dependency_idl_files)',
89 '<@(modules_dependency_idl_files)', 88 '<@(modules_dependency_idl_files)',
90 '<@(modules_testing_dependency_idl_files)', 89 '<@(modules_testing_dependency_idl_files)',
91 ], 90 ],
92 91
93 # Generated IDL files 92 # Generated IDL files
94 'generated_interface_idl_files': [ 93 'generated_interface_idl_files': [
95 '<@(generated_webcore_testing_idl_files)', # interfaces 94 '<@(generated_webcore_testing_idl_files)', # interfaces
96 ], 95 ],
97 'generated_dependency_idl_files': [ 96 'generated_dependency_idl_files': [
98 '<@(generated_global_constructors_idl_files)', # partial interfaces 97 '<@(generated_global_constructors_idl_files)', # partial interfaces
99 ], 98 ],
100 99
101 'generated_global_constructors_idl_files': [ 100 'generated_global_constructors_idl_files': [
102 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl', 101 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl',
103 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl', 102 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl',
104 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.idl ', 103 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.idl' ,
105 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors. idl', 104 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors.i dl',
106 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl', 105 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl',
107 ], 106 ],
108 107
109 # Python source 108 # Python source
110 'jinja_module_files': [ 109 'jinja_module_files': [
111 # jinja2/__init__.py contains version string, so sufficient for package 110 # jinja2/__init__.py contains version string, so sufficient for package
112 '<(DEPTH)/third_party/jinja2/__init__.py', 111 '<(DEPTH)/third_party/jinja2/__init__.py',
113 '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep 112 '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
114 ], 113 ],
115 'idl_compiler_files': [ 114 'idl_compiler_files': [
116 'scripts/idl_compiler.py', 115 'scripts/idl_compiler.py',
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 # actions into ninja restat rules). 161 # actions into ninja restat rules).
163 ['"<(GENERATOR)"=="ninja"', { 162 ['"<(GENERATOR)"=="ninja"', {
164 'write_file_only_if_changed': '--write-file-only-if-changed 1', 163 'write_file_only_if_changed': '--write-file-only-if-changed 1',
165 }, { 164 }, {
166 'write_file_only_if_changed': '--write-file-only-if-changed 0', 165 'write_file_only_if_changed': '--write-file-only-if-changed 0',
167 }], 166 }],
168 ], 167 ],
169 }, 168 },
170 169
171 'targets': [{ 170 'targets': [{
171 'target_name': 'global_constructors_idls',
172 'type': 'none',
173 'actions': [{
174 'action_name': 'generate_global_constructors_idls',
175 'variables': {
176 # Write list of IDL files to a file, so that the command line doesn't
177 # exceed OS length limits.
178 'idl_files_list': '<|(idl_files_list.tmp <@(static_idl_files))',
179 },
180 'inputs': [
181 'scripts/generate_global_constructors.py',
182 'scripts/utilities.py',
183 '<(idl_files_list)',
184 '<@(static_idl_files)',
185 ],
186 'outputs': [
187 '<@(generated_global_constructors_idl_files)',
188 ],
189 'action': [
190 'python',
191 'scripts/generate_global_constructors.py',
192 '--idl-files-list',
193 '<(idl_files_list)',
194 '<@(write_file_only_if_changed)',
195 '--window-constructors-file',
196 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl',
197 '--workerglobalscope-constructors-file',
198 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl',
199 '--sharedworkerglobalscope-constructors-file',
200 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.id l',
201 '--dedicatedworkerglobalscope-constructors-file',
202 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructors .idl',
203 '--serviceworkerglobalscope-constructors-file',
204 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl',
205 ],
206 'message': 'Generating IDL files for constructors on global objects',
207 }]
208 },
209 {
172 'target_name': 'interfaces_info', 210 'target_name': 'interfaces_info',
173 'type': 'none', 211 'type': 'none',
174 'dependencies': [ 212 'dependencies': [
213 'global_constructors_idls',
175 '../core/core_generated.gyp:generated_testing_idls', 214 '../core/core_generated.gyp:generated_testing_idls',
176 ], 215 ],
177 'actions': [{ 216 'actions': [{
178 'action_name': 'compute_interfaces_info', 217 'action_name': 'compute_interfaces_info',
179 'variables': { 218 'variables': {
180 # Write list of static IDL files to a file, so that the command line 219 # Write list of static IDL files to a file, so that the command line
181 # doesn't exceed OS length limits. 220 # doesn't exceed OS length limits.
182 # Generated IDL files cannot be included, as their path depends on the 221 # Generated IDL files cannot be included, as their path depends on the
183 # build directory, and must instead be passed as command line arguments. 222 # build directory, and must instead be passed as command line arguments.
184 'idl_files_list': '<|(idl_files_list.tmp <@(static_idl_files))', 223 'idl_files_list': '<|(idl_files_list.tmp <@(static_idl_files))',
185 }, 224 },
186 'inputs': [ 225 'inputs': [
187 'scripts/compute_interfaces_info.py', 226 'scripts/compute_interfaces_info.py',
227 'scripts/utilities.py',
188 '<(idl_files_list)', 228 '<(idl_files_list)',
189 '<@(static_idl_files)', 229 '<@(static_idl_files)',
190 '<@(generated_idl_files)', 230 '<@(generated_idl_files)',
191 ], 231 ],
192 'outputs': [ 232 'outputs': [
193 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt', 233 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt',
194 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle', 234 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle',
195 '<@(generated_global_constructors_idl_files)', 235 '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in',
196 '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in', 236 ],
197 ], 237 'action': [
198 'action': [ 238 'python',
199 'python', 239 'scripts/compute_interfaces_info.py',
200 'scripts/compute_interfaces_info.py', 240 '--idl-files-list',
201 '--idl-files-list', 241 '<(idl_files_list)',
202 '<(idl_files_list)', 242 '--interface-dependencies-file',
203 '--interface-dependencies-file', 243 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt',
204 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfaceDependencies.txt', 244 '--interfaces-info-file',
205 '--interfaces-info-file', 245 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle',
206 '<(SHARED_INTERMEDIATE_DIR)/blink/InterfacesInfo.pickle', 246 '--event-names-file',
207 '--window-constructors-file', 247 '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in',
208 '<(SHARED_INTERMEDIATE_DIR)/blink/WindowConstructors.idl', 248 '<@(write_file_only_if_changed)',
209 '--workerglobalscope-constructors-file', 249 '--',
210 '<(SHARED_INTERMEDIATE_DIR)/blink/WorkerGlobalScopeConstructors.idl', 250 '<@(generated_idl_files)',
211 '--sharedworkerglobalscope-constructors-file', 251 ],
212 '<(SHARED_INTERMEDIATE_DIR)/blink/SharedWorkerGlobalScopeConstructors.i dl', 252 'message': 'Computing global information about IDL files, and generating l ist of Event interfaces',
213 '--dedicatedworkerglobalscope-constructors-file',
214 '<(SHARED_INTERMEDIATE_DIR)/blink/DedicatedWorkerGlobalScopeConstructor s.idl',
215 '--serviceworkerglobalscope-constructors-file',
216 '<(SHARED_INTERMEDIATE_DIR)/ServiceWorkerGlobalScopeConstructors.idl',
217 '--event-names-file',
218 '<(SHARED_INTERMEDIATE_DIR)/blink/EventInterfaces.in',
219 '<@(write_file_only_if_changed)',
220 '--',
221 '<@(generated_idl_files)',
222 ],
223 'message': 'Computing global information about IDL files, and generating global scope constructor IDLs files and list of Event interfaces',
224 }] 253 }]
225 }, 254 },
226 { 255 {
227 # A separate pre-caching step is *required* to use bytecode caching in 256 # A separate pre-caching step is *required* to use bytecode caching in
228 # Jinja (which improves speed significantly), as the bytecode cache is 257 # Jinja (which improves speed significantly), as the bytecode cache is
229 # not concurrency-safe on write; details in code_generator_v8.py. 258 # not concurrency-safe on write; details in code_generator_v8.py.
230 'target_name': 'cached_jinja_templates', 259 'target_name': 'cached_jinja_templates',
231 'type': 'none', 260 'type': 'none',
232 'actions': [{ 261 'actions': [{
233 'action_name': 'cache_jinja_templates', 262 'action_name': 'cache_jinja_templates',
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 { 364 {
336 'target_name': 'generated_bindings', 365 'target_name': 'generated_bindings',
337 'type': 'none', 366 'type': 'none',
338 'dependencies': [ 367 'dependencies': [
339 'aggregate_generated_bindings', 368 'aggregate_generated_bindings',
340 'individual_generated_bindings', 369 'individual_generated_bindings',
341 ], 370 ],
342 }, 371 },
343 ], 372 ],
344 } 373 }
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