Chromium Code Reviews| 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 # 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 Loading... | |
| 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 the source directory. | |
|
xyzzyz
2017/01/20 18:27:40
The "source directory" here is pretty ambiguous. I
Ramin Halavati
2017/01/23 14:27:06
Done.
| |
| 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 Loading... | |
| 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)) { | |
|
xyzzyz
2017/01/20 18:27:40
The comment and the name of the variable say it's
Ramin Halavati
2017/01/23 14:27:06
If one specifies several directories in import_dir
| |
| 285 args += ["--import-dir"] | |
| 286 args += rebase_path(invoker.import_dirs, proto_in_dir) | |
|
xyzzyz
2017/01/20 18:27:40
Are you sure you want to rebase it on proto_in_dir
Ramin Halavati
2017/01/23 14:27:06
I didn't find any documentations on this but it se
| |
| 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 Loading... | |
| 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 } |
| OLD | NEW |