Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/scripts/scripts.gni |
| diff --git a/third_party/WebKit/Source/bindings/scripts/scripts.gni b/third_party/WebKit/Source/bindings/scripts/scripts.gni |
| index 9fefa29e601331ce506918801092f702ddc707e1..5fc45e831616e814963616bb158c0cbcd00ac0ed 100644 |
| --- a/third_party/WebKit/Source/bindings/scripts/scripts.gni |
| +++ b/third_party/WebKit/Source/bindings/scripts/scripts.gni |
| @@ -434,3 +434,54 @@ template("generate_global_constructors") { |
| deps = invoker.deps |
| } |
| } |
| + |
| +# Calls the generate_conditional_features script. |
| +# |
| +# Parameters: |
| +# sources = a list of source IDL files. |
| +# component = component to generate conditional feature bindings for ("Core" or "Modules") |
|
Yuki
2017/07/15 12:09:19
nit: 80 columns?
iclelland
2017/07/16 04:23:06
Sure. I didn't see anything in the GN style guide
|
| +# output_dir = output directory to generate cpp file and header file. |
| +# deps = dependencies |
| +# |
| +template("generate_conditional_features") { |
| + action(target_name) { |
| + script = "//third_party/WebKit/Source/bindings/scripts/generate_conditional_features.py" |
| + |
| + # Write the file list to a unique temp file to avoid blowing out the |
| + # command line length limit. |
| + idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" |
| + write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) |
| + |
| + inputs = [ |
| + "//third_party/WebKit/Source/bindings/scripts/utilities.py", |
| + "//third_party/WebKit/Source/bindings/templates/ConditionalFeaturesFor${invoker.component}.cpp.tmpl", |
| + "//third_party/WebKit/Source/bindings/templates/ConditionalFeaturesFor${invoker.component}.h.tmpl", |
| + idl_files_list, |
| + ] + invoker.sources |
| + |
| + args = [ |
| + "--output-directory", |
| + rebase_path(invoker.output_dir, root_build_dir), |
| + "--info-dir", |
| + "gen/blink/bindings", |
| + "--cache-dir", |
| + rebase_path(bindings_scripts_output_dir, root_build_dir), |
| + "--target-component", |
| + invoker.component, |
| + "--idl-files-list", |
| + rebase_path(idl_files_list, root_build_dir), |
| + ] |
| + |
| + outputs = [ |
| + "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.cpp", |
| + "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.h", |
| + ] |
| + |
| + # TODO: This should not always require modules; For core features, this |
| + # should be interfaces_info_core (w/o modules). This is the same issue as |
| + # above in the idl_compiler template. |
| + # http://crbug.com/358074 |
| + deps = invoker.deps + |
| + [ "//third_party/WebKit/Source/bindings/modules:interfaces_info" ] |
| + } |
| +} |