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 config("protobuf_config") { | 5 config("protobuf_config") { |
| 6 include_dirs = [ "src" ] | 6 include_dirs = [ "src" ] |
| 7 defines = [ | 7 defines = [ |
| 8 "GOOGLE_PROTOBUF_NO_RTTI", | 8 "GOOGLE_PROTOBUF_NO_RTTI", |
| 9 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", | 9 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", |
| 10 ] | 10 ] |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 | 322 |
| 323 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 323 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 324 "//build/config/compiler:no_size_t_to_int_warning", | 324 "//build/config/compiler:no_size_t_to_int_warning", |
| 325 ] | 325 ] |
| 326 | 326 |
| 327 cflags = protobuf_lite_cflags | 327 cflags = protobuf_lite_cflags |
| 328 } | 328 } |
| 329 | 329 |
| 330 # Only compile the compiler for the host architecture. | 330 # Only compile the compiler for the host architecture. |
| 331 if (current_toolchain == host_toolchain) { | 331 if (current_toolchain == host_toolchain) { |
| 332 executable("protoc") { | 332 source_set("protoc_lib") { |
| 333 sources = [ | 333 sources = [ |
| 334 "src/google/protobuf/compiler/code_generator.cc", | 334 "src/google/protobuf/compiler/code_generator.cc", |
| 335 "src/google/protobuf/compiler/code_generator.h", | 335 "src/google/protobuf/compiler/code_generator.h", |
| 336 "src/google/protobuf/compiler/command_line_interface.cc", | 336 "src/google/protobuf/compiler/command_line_interface.cc", |
| 337 "src/google/protobuf/compiler/command_line_interface.h", | 337 "src/google/protobuf/compiler/command_line_interface.h", |
| 338 "src/google/protobuf/compiler/cpp/cpp_enum.cc", | 338 "src/google/protobuf/compiler/cpp/cpp_enum.cc", |
| 339 "src/google/protobuf/compiler/cpp/cpp_enum.h", | 339 "src/google/protobuf/compiler/cpp/cpp_enum.h", |
| 340 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", | 340 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", |
| 341 "src/google/protobuf/compiler/cpp/cpp_enum_field.h", | 341 "src/google/protobuf/compiler/cpp/cpp_enum_field.h", |
| 342 "src/google/protobuf/compiler/cpp/cpp_extension.cc", | 342 "src/google/protobuf/compiler/cpp/cpp_extension.cc", |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 "src/google/protobuf/compiler/javanano/javanano_map_field.cc", | 469 "src/google/protobuf/compiler/javanano/javanano_map_field.cc", |
| 470 "src/google/protobuf/compiler/javanano/javanano_map_field.h", | 470 "src/google/protobuf/compiler/javanano/javanano_map_field.h", |
| 471 "src/google/protobuf/compiler/javanano/javanano_message.cc", | 471 "src/google/protobuf/compiler/javanano/javanano_message.cc", |
| 472 "src/google/protobuf/compiler/javanano/javanano_message.h", | 472 "src/google/protobuf/compiler/javanano/javanano_message.h", |
| 473 "src/google/protobuf/compiler/javanano/javanano_message_field.cc", | 473 "src/google/protobuf/compiler/javanano/javanano_message_field.cc", |
| 474 "src/google/protobuf/compiler/javanano/javanano_message_field.h", | 474 "src/google/protobuf/compiler/javanano/javanano_message_field.h", |
| 475 "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc", | 475 "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc", |
| 476 "src/google/protobuf/compiler/javanano/javanano_primitive_field.h", | 476 "src/google/protobuf/compiler/javanano/javanano_primitive_field.h", |
| 477 "src/google/protobuf/compiler/js/js_generator.cc", | 477 "src/google/protobuf/compiler/js/js_generator.cc", |
| 478 "src/google/protobuf/compiler/js/js_generator.h", | 478 "src/google/protobuf/compiler/js/js_generator.h", |
| 479 "src/google/protobuf/compiler/main.cc", | |
| 480 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", | 479 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", |
| 481 "src/google/protobuf/compiler/objectivec/objectivec_enum.h", | 480 "src/google/protobuf/compiler/objectivec/objectivec_enum.h", |
| 482 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", | 481 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", |
| 483 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h", | 482 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h", |
| 484 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", | 483 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", |
| 485 "src/google/protobuf/compiler/objectivec/objectivec_extension.h", | 484 "src/google/protobuf/compiler/objectivec/objectivec_extension.h", |
| 486 "src/google/protobuf/compiler/objectivec/objectivec_field.cc", | 485 "src/google/protobuf/compiler/objectivec/objectivec_field.cc", |
| 487 "src/google/protobuf/compiler/objectivec/objectivec_field.h", | 486 "src/google/protobuf/compiler/objectivec/objectivec_field.h", |
| 488 "src/google/protobuf/compiler/objectivec/objectivec_file.cc", | 487 "src/google/protobuf/compiler/objectivec/objectivec_file.cc", |
| 489 "src/google/protobuf/compiler/objectivec/objectivec_file.h", | 488 "src/google/protobuf/compiler/objectivec/objectivec_file.h", |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 | 520 |
| 522 # Must be after no_chromium_code for warning flags to be ordered | 521 # Must be after no_chromium_code for warning flags to be ordered |
| 523 # correctly. | 522 # correctly. |
| 524 ":protobuf_warnings", | 523 ":protobuf_warnings", |
| 525 ] | 524 ] |
| 526 if (is_win) { | 525 if (is_win) { |
| 527 # This is defined internally, don't warn on duplicate. | 526 # This is defined internally, don't warn on duplicate. |
| 528 configs -= [ "//build/config/win:lean_and_mean" ] | 527 configs -= [ "//build/config/win:lean_and_mean" ] |
| 529 } | 528 } |
| 530 | 529 |
| 530 public_configs = [ ":protobuf_config" ] | |
| 531 | |
| 531 cflags = protobuf_lite_cflags | 532 cflags = protobuf_lite_cflags |
| 532 | 533 |
| 533 deps = [ | 534 deps = [ |
| 534 ":protobuf_full", | 535 ":protobuf_full", |
| 535 "//build/config/sanitizers:deps", | 536 ] |
| 537 } | |
| 538 | |
| 539 executable("protoc") { | |
| 540 sources = [ | |
| 541 "src/google/protobuf/compiler/main.cc", | |
| 542 ] | |
| 543 | |
| 544 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 545 configs += ["//build/config/compiler:no_chromium_code"] | |
| 546 | |
| 547 cflags = protobuf_lite_cflags | |
| 548 | |
| 549 deps = [ | |
| 550 ":protobuf_full", | |
|
Peter Kasting
2016/04/28 00:29:36
If this needs to depend on protobuf_full because a
xyzzyz
2016/04/28 20:00:31
I think it's "public_deps". Setting this for proto
| |
| 551 ":protoc_lib", | |
| 536 | 552 |
| 537 # Default manifest on Windows (a no-op elsewhere). | 553 # Default manifest on Windows (a no-op elsewhere). |
| 538 "//build/win:default_exe_manifest", | 554 "//build/win:default_exe_manifest", |
| 539 ] | 555 ] |
| 540 deps += [ "//build/config/sanitizers:deps" ] | |
| 541 } | 556 } |
| 542 } | 557 } |
| 543 | 558 |
| 544 google_python_dir = "$root_out_dir/pyproto/google" | 559 google_python_dir = "$root_out_dir/pyproto/google" |
| 545 | 560 |
| 546 copy("copy_google") { | 561 copy("copy_google") { |
| 547 sources = [ | 562 sources = [ |
| 548 "__init__.py", | 563 "__init__.py", |
| 549 ] | 564 ] |
| 550 outputs = [ | 565 outputs = [ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 617 ":copy_google_protobuf_internal", | 632 ":copy_google_protobuf_internal", |
| 618 ":copy_six", | 633 ":copy_six", |
| 619 ] | 634 ] |
| 620 | 635 |
| 621 # Targets that depend on this should depend on the copied data files. | 636 # Targets that depend on this should depend on the copied data files. |
| 622 data = get_target_outputs(":copy_google") | 637 data = get_target_outputs(":copy_google") |
| 623 data += get_target_outputs(":copy_six") | 638 data += get_target_outputs(":copy_six") |
| 624 data += get_target_outputs(":copy_google_protobuf") | 639 data += get_target_outputs(":copy_google_protobuf") |
| 625 data += get_target_outputs(":copy_google_protobuf_internal") | 640 data += get_target_outputs(":copy_google_protobuf_internal") |
| 626 } | 641 } |
| OLD | NEW |