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

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, 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
« no previous file with comments | « no previous file | tools/protoc_wrapper/protoc_wrapper.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 foreach(path, invoker.import_dirs) {
286 args += ["--import-dir", rebase_path(path, root_build_dir)]
Dirk Pranke 2017/01/25 03:32:40 This might actually need to be --import-dir=" + re
Ramin Halavati 2017/02/10 06:21:10 Done.
287 }
288 }
289
280 # System protoc is not used so it's necessary to build a chromium one. 290 # System protoc is not used so it's necessary to build a chromium one.
281 inputs = [ 291 inputs = [
282 protoc_path, 292 protoc_path,
283 ] 293 ]
284 deps = [ 294 deps = [
285 protoc_label, 295 protoc_label,
286 ] 296 ]
287 297
288 if (generate_with_plugin) { 298 if (generate_with_plugin) {
289 inputs += [ plugin_path ] 299 inputs += [ plugin_path ]
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 ":$action_name", 378 ":$action_name",
369 ] 379 ]
370 380
371 # This will link any libraries in the deps (the use of invoker.deps in the 381 # This will link any libraries in the deps (the use of invoker.deps in the
372 # action won't link it). 382 # action won't link it).
373 if (defined(invoker.deps)) { 383 if (defined(invoker.deps)) {
374 deps += invoker.deps 384 deps += invoker.deps
375 } 385 }
376 } 386 }
377 } 387 }
OLDNEW
« no previous file with comments | « no previous file | tools/protoc_wrapper/protoc_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698