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

Side by Side Diff: mojo/public/tools/bindings/mojom.gni

Issue 1635613002: [mojo-bindings] Support reuse of native enum classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more missing public_deps Created 4 years, 10 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
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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 # typemaps (optional) 54 # typemaps (optional)
55 # A list of typemap files to apply during bindings generation. 55 # A list of typemap files to apply during bindings generation.
56 # 56 #
57 # typemap_deps (optional) 57 # typemap_deps (optional)
58 # A list of public dependencies needed to support active typemaps. 58 # A list of public dependencies needed to support active typemaps.
59 # 59 #
60 # variant (optional) 60 # variant (optional)
61 # A variant name to apply to generated bindings. Variant influences 61 # A variant name to apply to generated bindings. Variant influences
62 # generated source filenames as wells the symbols they define. 62 # generated source filenames as wells the symbols they define.
63 # 63 #
64 # cpp_only (optional)
65 # If true, only C++ bindings will be generated. This defaults to false
66 # unless |variant| is specified.
67 #
64 # testonly (optional) 68 # testonly (optional)
65 # 69 #
66 # visibility (optional) 70 # visibility (optional)
67 template("mojom") { 71 template("mojom") {
68 assert( 72 assert(
69 defined(invoker.sources) || defined(invoker.deps) || 73 defined(invoker.sources) || defined(invoker.deps) ||
70 defined(invoker.public_deps), 74 defined(invoker.public_deps),
71 "\"sources\" or \"deps\" must be defined for the $target_name template.") 75 "\"sources\" or \"deps\" must be defined for the $target_name template.")
72 76
73 cpp_sources_suffix = "cpp_sources" 77 cpp_sources_suffix = "cpp_sources"
74 cpp_sources_target_name = "${target_name}_${cpp_sources_suffix}" 78 cpp_sources_target_name = "${target_name}_${cpp_sources_suffix}"
75 cpp_only = false 79 cpp_only = false
80 if (defined(invoker.cpp_only)) {
81 cpp_only = invoker.cpp_only
82 }
76 if (defined(invoker.sources)) { 83 if (defined(invoker.sources)) {
77 if (defined(invoker.variant)) { 84 if (defined(invoker.variant)) {
78 variant = invoker.variant 85 variant = invoker.variant
79 cpp_only = true 86 cpp_only = true
80 generator_cpp_outputs = [ 87 generator_cpp_outputs = [
81 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}.cc", 88 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}.cc",
82 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}.h", 89 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}.h",
83 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}-internal.h", 90 "{{source_gen_dir}}/{{source_name_part}}.mojom-${variant}-internal.h",
84 ] 91 ]
85 } else { 92 } else {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 # //mojo/something:something and we can append "_java" to get the java 298 # //mojo/something:something and we can append "_java" to get the java
292 # dependency name. 299 # dependency name.
293 full_name = get_label_info(d, "label_no_toolchain") 300 full_name = get_label_info(d, "label_no_toolchain")
294 deps += [ "${full_name}_java" ] 301 deps += [ "${full_name}_java" ]
295 } 302 }
296 303
297 srcjar_deps = [ ":$java_srcjar_target_name" ] 304 srcjar_deps = [ ":$java_srcjar_target_name" ]
298 } 305 }
299 } 306 }
300 } 307 }
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | mojo/public/tools/bindings/pylib/mojom/generate/data.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698