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

Side by Side Diff: third_party/protobuf/proto_library.gni

Issue 2646123002: Option added to protobuf build for import directories (Closed)
Patch Set: Comments addressed. Created 3 years, 11 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 # Compile a protocol buffer. 5 # Compile a protocol buffer.
6 # 6 #
7 # Protobuf parameters: 7 # Protobuf parameters:
8 # 8 #
9 # proto_in_dir (optional) 9 # proto_in_dir (optional)
10 # Specifies the path relative to the current BUILD.gn file where 10 # Specifies the path relative to the current BUILD.gn file where
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 # generator_plugin_options (optional) 56 # generator_plugin_options (optional)
57 # Extra flags passed to the plugin. See cc_generator_options. 57 # Extra flags passed to the plugin. See cc_generator_options.
58 # 58 #
59 # deps (optional) 59 # deps (optional)
60 # Additional dependencies. 60 # Additional dependencies.
61 # 61 #
62 # use_protobuf_full (optional) 62 # use_protobuf_full (optional)
63 # If adding protobuf library would be required, adds protobuf_full to deps 63 # If adding protobuf library would be required, adds protobuf_full to deps
64 # instead of protobuf_lite. 64 # instead of protobuf_lite.
65 # 65 #
66 # import_dirs (optional)
67 # A list of extra import directories to be passed to protoc compiler. The
68 # default case is just proto_in_dir.
69 #
66 # Parameters for compiling the generated code: 70 # Parameters for compiling the generated code:
67 # 71 #
68 # component_build_force_source_set (Default=false) 72 # component_build_force_source_set (Default=false)
69 # When set true the generated code will be compiled as a source set in 73 # When set true the generated code will be compiled as a source set in
70 # the component build. This does not affect static builds. If you are 74 # the component build. This does not affect static builds. If you are
71 # exporting symbols from a component, this is required to prevent those 75 # exporting symbols from a component, this is required to prevent those
72 # symbols from being stripped. If you're not using dllexports in 76 # symbols from being stripped. If you're not using dllexports in
73 # cc_generator_options, it's usually best to leave this false. 77 # cc_generator_options, it's usually best to leave this false.
74 # 78 #
75 # defines (optional) 79 # defines (optional)
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 rel_cc_out_dir, 274 rel_cc_out_dir,
271 ] 275 ]
272 if (defined(invoker.generator_plugin_options)) { 276 if (defined(invoker.generator_plugin_options)) {
273 args += [ 277 args += [
274 "--plugin-options", 278 "--plugin-options",
275 invoker.generator_plugin_options, 279 invoker.generator_plugin_options,
276 ] 280 ]
277 } 281 }
278 } 282 }
279 283
284 if (defined(invoker.import_dirs)) {
285 args += ["--import-dir"]
xyzzyz 2017/01/23 17:53:56 I was under impression before that the way this fl
Dirk Pranke 2017/01/24 02:31:20 argparse will actually accept either, but the latt
Ramin Halavati 2017/01/24 08:38:33 Done, changed it to one --import-dir switch for ea
286 args += rebase_path(invoker.import_dirs, root_build_dir)
287 }
288
280 # System protoc is not used so it's necessary to build a chromium one. 289 # System protoc is not used so it's necessary to build a chromium one.
281 inputs = [ 290 inputs = [
282 protoc_path, 291 protoc_path,
283 ] 292 ]
284 deps = [ 293 deps = [
285 protoc_label, 294 protoc_label,
286 ] 295 ]
287 296
288 if (generate_with_plugin) { 297 if (generate_with_plugin) {
289 inputs += [ plugin_path ] 298 inputs += [ plugin_path ]
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 ":$action_name", 377 ":$action_name",
369 ] 378 ]
370 379
371 # This will link any libraries in the deps (the use of invoker.deps in the 380 # This will link any libraries in the deps (the use of invoker.deps in the
372 # action won't link it). 381 # action won't link it).
373 if (defined(invoker.deps)) { 382 if (defined(invoker.deps)) {
374 deps += invoker.deps 383 deps += invoker.deps
375 } 384 }
376 } 385 }
377 } 386 }
OLDNEW
« no previous file with comments | « no previous file | tools/protoc_wrapper/protoc_wrapper.py » ('j') | tools/protoc_wrapper/protoc_wrapper.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698