| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni") |
| import("//third_party/WebKit/Source/bindings/scripts/scripts.gni") |
| import("//third_party/WebKit/Source/modules/modules.gni") |
| import("//third_party/WebKit/Source/modules/modules_idl_files.gni") |
| |
| visibility = [ "//third_party/WebKit/*" ] |
| |
| group("bindings_modules_v8_generated") { |
| public_deps = [ |
| ":bindings_modules_impl_generated", |
| ":bindings_modules_v8_generated_init_partial", |
| ":generate_bindings_modules_v8_interfaces", |
| ":generate_bindings_modules_v8_partial_interfaces", |
| ":generate_bindings_modules_v8_partial_interfaces_for_testing", |
| ] |
| } |
| |
| idl_compiler("generate_bindings_modules_v8_interfaces") { |
| sources = modules_definition_idl_files |
| output_dir = bindings_modules_v8_output_dir |
| output_name_suffix = "" |
| target_component = "modules" |
| } |
| |
| idl_impl("bindings_modules_impl_generated") { |
| dict_idls = modules_dictionary_idl_files |
| non_dict_outputs = bindings_modules_generated_union_type_files + |
| generated_modules_callback_function_files |
| non_dict_output_dir = bindings_modules_v8_output_dir |
| target_component = "modules" |
| } |
| |
| idl_compiler("generate_bindings_modules_v8_partial_interfaces") { |
| sources = core_idl_with_modules_dependency_files |
| output_dir = bindings_modules_v8_output_dir |
| output_name_suffix = "Partial" |
| target_component = "modules" |
| } |
| |
| idl_compiler("generate_bindings_modules_v8_partial_interfaces_for_testing") { |
| sources = webcore_testing_idl_with_modules_dependency_files |
| output_dir = bindings_modules_v8_output_dir |
| output_name_suffix = "Partial" |
| target_component = "modules" |
| } |
| |
| generate_conditional_features("bindings_modules_conditional_features") { |
| sources = |
| modules_idl_files + modules_global_constructors_generated_idl_files + |
| modules_dependency_idl_files |
| component = "Modules" |
| output_dir = bindings_modules_output_dir + "/v8" |
| deps = [ |
| "//third_party/WebKit/Source/bindings/modules:modules_global_constructors_idls", |
| ] |
| } |
| |
| action("bindings_modules_v8_generated_init_partial") { |
| script = "$bindings_scripts_dir/generate_init_partial_interfaces.py" |
| |
| inputs = [ |
| "$bindings_modules_output_dir/InterfacesInfoOverall.pickle", |
| ] |
| outputs = [ |
| bindings_modules_generated_init_partial_interfaces_file, |
| ] |
| |
| # Put the IDL file list in a response file to avoid command-line limits. |
| response_file_contents = |
| rebase_path(core_idl_with_modules_dependency_files, root_build_dir) |
| |
| args = [ |
| "--idl-files-list", |
| "{{response_file_name}}", |
| "--output", |
| rebase_path(bindings_modules_generated_init_partial_interfaces_file, |
| root_build_dir), |
| ] |
| |
| deps = [ |
| "//third_party/WebKit/Source/bindings/modules:interfaces_info", |
| ] |
| } |
| |
| blink_modules_sources("bindings_modules_impl") { |
| # ":generate_bindings_modules_v8_partial_interfaces_for_testing" is not |
| # included here. |
| sources = |
| get_target_outputs(":generate_bindings_modules_v8_interfaces") + |
| get_target_outputs(":bindings_modules_impl_generated") + |
| get_target_outputs(":generate_bindings_modules_v8_partial_interfaces") + |
| get_target_outputs(":bindings_modules_v8_generated_init_partial") + |
| get_target_outputs(":bindings_modules_conditional_features") |
| |
| deps = [ |
| ":bindings_modules_conditional_features", |
| ":bindings_modules_v8_generated", |
| ] |
| |
| if (!is_component_build && is_win) { |
| # This target as a static library (for non-component builds) is >4GB on |
| # Windows, this causes linking to fail. As a workaround, split it into |
| # multiple shards. |
| split_count = 5 |
| } |
| } |