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 |
| 380 # Protoc generates such sequences frequently, there's no obvious |
| 381 # superior replacement behavior. Since this code is autogenerated, |
| 382 # the warning would never catch a legitimate bug. |
| 383 "/wd4125", |
| 384 ] |
| 385 } |
376 } | 386 } |
377 } | 387 } |
378 | 388 |
379 deps = [ | 389 deps = [ |
380 ":$action_name", | 390 ":$action_name", |
381 ] | 391 ] |
382 | 392 |
383 # This will link any libraries in the deps (the use of invoker.deps in the | 393 # This will link any libraries in the deps (the use of invoker.deps in the |
384 # action won't link it). | 394 # action won't link it). |
385 if (defined(invoker.deps)) { | 395 if (defined(invoker.deps)) { |
386 deps += invoker.deps | 396 deps += invoker.deps |
387 } | 397 } |
388 } | 398 } |
389 } | 399 } |
OLD | NEW |