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

Side by Side Diff: Source/bindings/scripts/scripts.gni

Issue 680193003: IDL: Generate union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") 5 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
6 import("//third_party/WebKit/Source/bindings/modules/idl.gni") 6 import("//third_party/WebKit/Source/bindings/modules/idl.gni")
7 import("//third_party/WebKit/Source/bindings/modules/modules.gni") 7 import("//third_party/WebKit/Source/bindings/modules/modules.gni")
8 8
9 bindings_scripts_dir = get_path_info(".", "abspath") 9 bindings_scripts_dir = get_path_info(".", "abspath")
10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" 10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 # http://crbug.com/358074 172 # http://crbug.com/358074
173 "//third_party/WebKit/Source/bindings/modules:interfaces_info", 173 "//third_party/WebKit/Source/bindings/modules:interfaces_info",
174 174
175 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", 175 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables",
176 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", 176 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates",
177 "//third_party/WebKit/Source/core:generated_testing_idls", 177 "//third_party/WebKit/Source/core:generated_testing_idls",
178 ] 178 ]
179 } 179 }
180 } 180 }
181 181
182 # Runs the idl_compiler to generate IDL dictionary impl files. 182 # Runs the idl_compiler to generate IDL dictionary and union impl files.
183 # 183 #
184 # Parameters: 184 # Parameters:
185 # sources = a list of IDL files to process 185 # sources = a list of IDL files to process
186 # outputs = a list of files to write to 186 # outputs = a list of files to write to
187 template("idl_dictionary") { 187 # output_dir = the directory to put the output files
188 output_dir = "$root_gen_dir/blink/" 188 # individual_info = a filename of pickle file which contains idl union types
189 # target_component = component to generate code for
190 template("idl_impl") {
191 dictionary_impl_output_dir = "$root_gen_dir/blink/"
189 192
190 action(target_name) { 193 action(target_name) {
191 script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py" 194 script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py"
192 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" 195 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
193 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) 196 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
194 197
195 inputs = [ idl_files_list ] + invoker.sources 198 inputs = [ idl_files_list ] + invoker.sources
196 outputs = invoker.outputs 199 outputs = invoker.outputs
197 200
198 args = [ 201 args = [
199 "--cache-dir", 202 "--cache-dir",
200 rebase_path(bindings_scripts_output_dir, root_build_dir), 203 rebase_path(bindings_scripts_output_dir, root_build_dir),
201 "--output-dir", 204 "--output-dir",
202 rebase_path(output_dir, root_build_dir), 205 rebase_path(invoker.output_dir, root_build_dir),
206 "--dictionary-impl-output-dir",
207 rebase_path(dictionary_impl_output_dir, root_build_dir),
203 "--interfaces-info", 208 "--interfaces-info",
204 rebase_path("$bindings_modules_output_dir/InterfacesInfoModules.pickle", 209 rebase_path("$bindings_modules_output_dir/InterfacesInfoModules.pickle",
205 root_build_dir), 210 root_build_dir),
211 "--individual-info",
212 rebase_path(invoker.individual_info, root_build_dir),
213 "--target-component",
214 invoker.target_component,
206 "--write-file-only-if-changed=1", 215 "--write-file-only-if-changed=1",
207 "--generate-dictionary-impl", 216 "--generate-impl",
208 rebase_path(idl_files_list, root_build_dir), 217 rebase_path(idl_files_list, root_build_dir),
209 ] 218 ]
210 219
211 deps = [ 220 deps = [
212 # FIXME: should be interfaces_info_core (w/o modules) 221 # FIXME: should be interfaces_info_core (w/o modules)
213 # http://crbug.com/358074 222 # http://crbug.com/358074
223 "//third_party/WebKit/Source/bindings/core:interfaces_info_individual_core ",
214 "//third_party/WebKit/Source/bindings/modules:interfaces_info", 224 "//third_party/WebKit/Source/bindings/modules:interfaces_info",
225 "//third_party/WebKit/Source/bindings/modules:interfaces_info_individual_m odules",
215 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", 226 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables",
216 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", 227 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates",
217 ] 228 ]
218 } 229 }
219 } 230 }
220 231
221 # Calls the aggregate_generated_bindings script. 232 # Calls the aggregate_generated_bindings script.
222 # 233 #
223 # Parameters: 234 # Parameters:
224 # sources = a list of source IDL files. 235 # sources = a list of source IDL files.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 output_header_files += [ 342 output_header_files += [
332 "$output_dir/${interface}${component}Constructors.h" 343 "$output_dir/${interface}${component}Constructors.h"
333 ] 344 ]
334 } 345 }
335 346
336 outputs = output_idl_files + output_header_files 347 outputs = output_idl_files + output_header_files
337 deps = invoker.deps 348 deps = invoker.deps
338 } 349 }
339 } 350 }
340 351
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698