Chromium Code Reviews| Index: third_party/protobuf/BUILD.gn |
| diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn |
| index e4520ec1473d5eb090d1ac311fa489f7938a2154..1c72a608f1449a7715a9128db923b6c04be34c4d 100644 |
| --- a/third_party/protobuf/BUILD.gn |
| +++ b/third_party/protobuf/BUILD.gn |
| @@ -329,7 +329,7 @@ source_set("protobuf_full") { |
| # Only compile the compiler for the host architecture. |
| if (current_toolchain == host_toolchain) { |
| - executable("protoc") { |
| + source_set("protoc_lib") { |
| sources = [ |
| "src/google/protobuf/compiler/code_generator.cc", |
| "src/google/protobuf/compiler/code_generator.h", |
| @@ -476,7 +476,6 @@ if (current_toolchain == host_toolchain) { |
| "src/google/protobuf/compiler/javanano/javanano_primitive_field.h", |
| "src/google/protobuf/compiler/js/js_generator.cc", |
| "src/google/protobuf/compiler/js/js_generator.h", |
| - "src/google/protobuf/compiler/main.cc", |
| "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", |
| "src/google/protobuf/compiler/objectivec/objectivec_enum.h", |
| "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", |
| @@ -528,16 +527,42 @@ if (current_toolchain == host_toolchain) { |
| configs -= [ "//build/config/win:lean_and_mean" ] |
| } |
| + public_configs = [ ":protobuf_config" ] |
| + |
| + cflags = protobuf_lite_cflags |
| + |
| + deps = [ |
| + ":protobuf_full", |
| + ] |
| + } |
| + |
| + executable("protoc") { |
| + sources = [ |
| + "src/google/protobuf/compiler/main.cc", |
| + ] |
| + |
| + configs -= [ "//build/config/compiler:chromium_code" ] |
| + configs += [ |
| + "//build/config/compiler:no_chromium_code", |
| + |
| + # Must be after no_chromium_code for warning flags to be ordered |
| + # correctly. |
| + ":protobuf_warnings", |
|
Peter Kasting
2016/04/27 22:30:16
Do we need this?
xyzzyz
2016/04/27 23:10:27
Removed.
|
| + ] |
| + if (is_win) { |
| + # This is defined internally, don't warn on duplicate. |
| + configs -= [ "//build/config/win:lean_and_mean" ] |
|
Peter Kasting
2016/04/27 22:30:17
Likewise, do we need this?
xyzzyz
2016/04/27 23:10:27
Removed.
|
| + } |
| + |
| cflags = protobuf_lite_cflags |
| deps = [ |
| ":protobuf_full", |
| - "//build/config/sanitizers:deps", |
| + ":protoc_lib", |
| # Default manifest on Windows (a no-op elsewhere). |
| "//build/win:default_exe_manifest", |
| ] |
| - deps += [ "//build/config/sanitizers:deps" ] |
|
Peter Kasting
2016/04/27 22:30:16
This seems to have disappeared entirely?
xyzzyz
2016/04/27 23:10:27
Yes, I added this during my struggle with the asan
|
| } |
| } |