OLD | NEW |
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 mojom_generator_root = "//mojo/public/tools/bindings" | 5 mojom_generator_root = "//mojo/public/tools/bindings" |
6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" | 6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" |
7 mojom_generator_sources = [ | 7 mojom_generator_sources = [ |
8 "$mojom_generator_root/generators/mojom_cpp_generator.py", | 8 "$mojom_generator_root/generators/mojom_cpp_generator.py", |
9 "$mojom_generator_root/generators/mojom_js_generator.py", | 9 "$mojom_generator_root/generators/mojom_js_generator.py", |
10 "$mojom_generator_root/generators/mojom_java_generator.py", | 10 "$mojom_generator_root/generators/mojom_java_generator.py", |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 # | 77 # |
78 # use_new_wrapper_types (optional) | 78 # use_new_wrapper_types (optional) |
79 # If set to true, mojom array/map/string will be mapped to STL (for | 79 # If set to true, mojom array/map/string will be mapped to STL (for |
80 # chromium variant) or WTF (for blink) types. Otherwise, they will be | 80 # chromium variant) or WTF (for blink) types. Otherwise, they will be |
81 # mapped to mojo::Array/Map/String/etc. | 81 # mapped to mojo::Array/Map/String/etc. |
82 # Default value is true. | 82 # Default value is true. |
83 # TODO(yzshen): | 83 # TODO(yzshen): |
84 # - convert all users to use the new mode; | 84 # - convert all users to use the new mode; |
85 # - remove support for the old mode. | 85 # - remove support for the old mode. |
86 # | 86 # |
| 87 # cpp_only (optional) |
| 88 # If set to true, only the C++ bindings targets will be generated. |
| 89 # |
87 # The following parameters are used to support the component build. They are | 90 # The following parameters are used to support the component build. They are |
88 # needed so that bindings which are linked with a component can use the same | 91 # needed so that bindings which are linked with a component can use the same |
89 # export settings for classes. The first three are for the chromium variant, and | 92 # export settings for classes. The first three are for the chromium variant, and |
90 # the last three are for the blink variant. | 93 # the last three are for the blink variant. |
91 # export_class_attribute (optional) | 94 # export_class_attribute (optional) |
92 # The attribute to add to the class declaration. e.g. "CONTENT_EXPORT" | 95 # The attribute to add to the class declaration. e.g. "CONTENT_EXPORT" |
93 # export_define (optional) | 96 # export_define (optional) |
94 # A define to be added to the source_set which is needed by the export | 97 # A define to be added to the source_set which is needed by the export |
95 # header. e.g. "CONTENT_IMPLEMENTATION=1" | 98 # header. e.g. "CONTENT_IMPLEMENTATION=1" |
96 # export_header (optional) | 99 # export_header (optional) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 # //mojo/something:something and we can append shared_cpp_sources_suffix | 210 # //mojo/something:something and we can append shared_cpp_sources_suffix |
208 # to get the cpp dependency name. | 211 # to get the cpp dependency name. |
209 full_name = get_label_info("$d", "label_no_toolchain") | 212 full_name = get_label_info("$d", "label_no_toolchain") |
210 public_deps += [ "${full_name}_${shared_cpp_sources_suffix}" ] | 213 public_deps += [ "${full_name}_${shared_cpp_sources_suffix}" ] |
211 } | 214 } |
212 } | 215 } |
213 | 216 |
214 # Generate code for variants. | 217 # Generate code for variants. |
215 foreach(bindings_configuration, _bindings_configurations) { | 218 foreach(bindings_configuration, _bindings_configurations) { |
216 cpp_only = false | 219 cpp_only = false |
| 220 if (defined(invoker.cpp_only)) { |
| 221 cpp_only = invoker.cpp_only |
| 222 } |
217 variant_suffix = "" | 223 variant_suffix = "" |
218 if (defined(bindings_configuration.variant)) { | 224 if (defined(bindings_configuration.variant)) { |
219 variant = bindings_configuration.variant | 225 variant = bindings_configuration.variant |
220 variant_suffix = "_${variant}" | 226 variant_suffix = "_${variant}" |
221 cpp_only = true | 227 cpp_only = true |
222 } | 228 } |
223 type_mappings_target_name = "${target_name}${variant_suffix}__type_mappings" | 229 type_mappings_target_name = "${target_name}${variant_suffix}__type_mappings" |
224 type_mappings_path = | 230 type_mappings_path = |
225 "$target_gen_dir/${target_name}${variant_suffix}__type_mappings" | 231 "$target_gen_dir/${target_name}${variant_suffix}__type_mappings" |
226 active_typemaps = [] | 232 active_typemaps = [] |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 full_name = get_label_info(d, "label_no_toolchain") | 544 full_name = get_label_info(d, "label_no_toolchain") |
539 deps += [ "${full_name}_java" ] | 545 deps += [ "${full_name}_java" ] |
540 } | 546 } |
541 | 547 |
542 srcjar_deps = [ ":$java_srcjar_target_name" ] | 548 srcjar_deps = [ ":$java_srcjar_target_name" ] |
543 run_findbugs_override = false | 549 run_findbugs_override = false |
544 } | 550 } |
545 } | 551 } |
546 } | 552 } |
547 } | 553 } |
OLD | NEW |