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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 if (defined(invoker.generator_plugin_options)) { | 278 if (defined(invoker.generator_plugin_options)) { |
| 279 args += [ | 279 args += [ |
| 280 "--plugin-options", | 280 "--plugin-options", |
| 281 invoker.generator_plugin_options, | 281 invoker.generator_plugin_options, |
| 282 ] | 282 ] |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 if (defined(invoker.import_dirs)) { | 286 if (defined(invoker.import_dirs)) { |
| 287 foreach(path, invoker.import_dirs) { | 287 foreach(path, invoker.import_dirs) { |
| 288 args += ["--import-dir=" + rebase_path(path, root_build_dir)] | 288 args += [ "--import-dir=" + rebase_path(path, root_build_dir) ] |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 | 291 |
| 292 # System protoc is not used so it's necessary to build a chromium one. | 292 # System protoc is not used so it's necessary to build a chromium one. |
| 293 inputs = [ | 293 inputs = [ |
| 294 protoc_path, | 294 protoc_path, |
| 295 ] | 295 ] |
| 296 deps = [ | 296 deps = [ |
| 297 protoc_label, | 297 protoc_label, |
| 298 ] | 298 ] |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 366 if (defined(invoker.use_protobuf_full) && | 366 if (defined(invoker.use_protobuf_full) && |
| 367 invoker.use_protobuf_full == true) { | 367 invoker.use_protobuf_full == true) { |
| 368 public_deps = [ | 368 public_deps = [ |
| 369 "//third_party/protobuf:protobuf_full", | 369 "//third_party/protobuf:protobuf_full", |
| 370 ] | 370 ] |
| 371 } else { | 371 } else { |
| 372 public_deps = [ | 372 public_deps = [ |
| 373 "//third_party/protobuf:protobuf_lite", | 373 "//third_party/protobuf:protobuf_lite", |
| 374 ] | 374 ] |
| 375 } | 375 } |
| 376 | |
| 377 if (is_win) { | |
| 378 cflags = [ | |
| 379 # disable: C4125 decimal digit terminates octal escape sequence | |
|
Peter Kasting
2017/03/15 20:23:37
Nit: I suggest adding:
protoc generates such sequ
aizatsky
2017/03/15 20:32:29
done.
| |
| 380 "/wd4125", | |
| 381 ] | |
| 382 } | |
| 376 } | 383 } |
| 377 } | 384 } |
| 378 | 385 |
| 379 deps = [ | 386 deps = [ |
| 380 ":$action_name", | 387 ":$action_name", |
| 381 ] | 388 ] |
| 382 | 389 |
| 383 # This will link any libraries in the deps (the use of invoker.deps in the | 390 # This will link any libraries in the deps (the use of invoker.deps in the |
| 384 # action won't link it). | 391 # action won't link it). |
| 385 if (defined(invoker.deps)) { | 392 if (defined(invoker.deps)) { |
| 386 deps += invoker.deps | 393 deps += invoker.deps |
| 387 } | 394 } |
| 388 } | 395 } |
| 389 } | 396 } |
| OLD | NEW |