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

Side by Side Diff: third_party/protobuf/BUILD.gn

Issue 1929963004: Revert of Split protoc into library and executable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | third_party/protobuf/protobuf.gyp » ('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 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
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 source_set("protoc_lib") { 332 executable("protoc") {
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
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",
479 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", 480 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc",
480 "src/google/protobuf/compiler/objectivec/objectivec_enum.h", 481 "src/google/protobuf/compiler/objectivec/objectivec_enum.h",
481 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", 482 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc",
482 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h", 483 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.h",
483 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", 484 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc",
484 "src/google/protobuf/compiler/objectivec/objectivec_extension.h", 485 "src/google/protobuf/compiler/objectivec/objectivec_extension.h",
485 "src/google/protobuf/compiler/objectivec/objectivec_field.cc", 486 "src/google/protobuf/compiler/objectivec/objectivec_field.cc",
486 "src/google/protobuf/compiler/objectivec/objectivec_field.h", 487 "src/google/protobuf/compiler/objectivec/objectivec_field.h",
487 "src/google/protobuf/compiler/objectivec/objectivec_file.cc", 488 "src/google/protobuf/compiler/objectivec/objectivec_file.cc",
488 "src/google/protobuf/compiler/objectivec/objectivec_file.h", 489 "src/google/protobuf/compiler/objectivec/objectivec_file.h",
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 521
521 # Must be after no_chromium_code for warning flags to be ordered 522 # Must be after no_chromium_code for warning flags to be ordered
522 # correctly. 523 # correctly.
523 ":protobuf_warnings", 524 ":protobuf_warnings",
524 ] 525 ]
525 if (is_win) { 526 if (is_win) {
526 # This is defined internally, don't warn on duplicate. 527 # This is defined internally, don't warn on duplicate.
527 configs -= [ "//build/config/win:lean_and_mean" ] 528 configs -= [ "//build/config/win:lean_and_mean" ]
528 } 529 }
529 530
530 public_configs = [ ":protobuf_config" ]
531
532 cflags = protobuf_lite_cflags
533
534 public_deps = [
535 ":protobuf_full",
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 531 cflags = protobuf_lite_cflags
548 532
549 deps = [ 533 deps = [
550 ":protoc_lib", 534 ":protobuf_full",
535 "//build/config/sanitizers:deps",
551 536
552 # Default manifest on Windows (a no-op elsewhere). 537 # Default manifest on Windows (a no-op elsewhere).
553 "//build/win:default_exe_manifest", 538 "//build/win:default_exe_manifest",
554 ] 539 ]
540 deps += [ "//build/config/sanitizers:deps" ]
555 } 541 }
556 } 542 }
557 543
558 google_python_dir = "$root_out_dir/pyproto/google" 544 google_python_dir = "$root_out_dir/pyproto/google"
559 545
560 copy("copy_google") { 546 copy("copy_google") {
561 sources = [ 547 sources = [
562 "__init__.py", 548 "__init__.py",
563 ] 549 ]
564 outputs = [ 550 outputs = [
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 ":copy_google_protobuf_internal", 617 ":copy_google_protobuf_internal",
632 ":copy_six", 618 ":copy_six",
633 ] 619 ]
634 620
635 # Targets that depend on this should depend on the copied data files. 621 # Targets that depend on this should depend on the copied data files.
636 data = get_target_outputs(":copy_google") 622 data = get_target_outputs(":copy_google")
637 data += get_target_outputs(":copy_six") 623 data += get_target_outputs(":copy_six")
638 data += get_target_outputs(":copy_google_protobuf") 624 data += get_target_outputs(":copy_google_protobuf")
639 data += get_target_outputs(":copy_google_protobuf_internal") 625 data += get_target_outputs(":copy_google_protobuf_internal")
640 } 626 }
OLDNEW
« no previous file with comments | « no previous file | third_party/protobuf/protobuf.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698