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

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

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « third_party/ots/tools/ttf-checksum.py ('k') | third_party/qcms/BUILD.gn » ('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 if (is_win) { 5 if (is_win) {
6 config_h_dir = "vsprojects" 6 config_h_dir = "vsprojects"
7 } else { 7 } else {
8 config_h_dir = "." 8 config_h_dir = "."
9 } 9 }
10 10
11 config("protobuf_config") { 11 config("protobuf_config") {
12 include_dirs = [ 12 include_dirs = [
13 "src", 13 "src",
14 config_h_dir, 14 config_h_dir,
15 ] 15 ]
16 defines = [ 16 defines = [
17 "GOOGLE_PROTOBUF_NO_RTTI", 17 "GOOGLE_PROTOBUF_NO_RTTI",
18 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER", 18 "GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
19 ] 19 ]
20
21 if (is_win) {
22 # TODO(jschuh): http://crbug.com/167187 size_t -> int.
23 cflags = [ "/wd4267" ]
24 }
20 } 25 }
21 26
22 if (component_mode == "shared_library") { 27 if (component_mode == "shared_library") {
23 config("protobuf_use_dlls") { 28 config("protobuf_use_dlls") {
24 defines = [ "PROTOBUF_USE_DLLS" ] 29 defines = [ "PROTOBUF_USE_DLLS" ]
25 } 30 }
26 } 31 }
27 32
28 # This config should be applied to targets using generated code from the proto 33 # This config should be applied to targets using generated code from the proto
29 # compiler. It sets up the include directories properly. 34 # compiler. It sets up the include directories properly.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 91 }
87 92
88 component("protobuf_lite") { 93 component("protobuf_lite") {
89 sources = protobuf_lite_sources 94 sources = protobuf_lite_sources
90 95
91 configs -= [ "//build/config/compiler:chromium_code" ] 96 configs -= [ "//build/config/compiler:chromium_code" ]
92 configs += [ "//build/config/compiler:no_chromium_code" ] 97 configs += [ "//build/config/compiler:no_chromium_code" ]
93 if (is_win) { 98 if (is_win) {
94 configs -= [ "//build/config/win:lean_and_mean" ] 99 configs -= [ "//build/config/win:lean_and_mean" ]
95 } 100 }
96 public_configs = [ 101 public_configs = [ ":protobuf_config" ]
97 ":protobuf_config",
98 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
99 "//build/config/compiler:no_size_t_to_int_warning",
100 ]
101 102
102 cflags = protobuf_lite_cflags 103 cflags = protobuf_lite_cflags
103 104
104 # Required for component builds. See http://crbug.com/172800. 105 # Required for component builds. See http://crbug.com/172800.
105 if (component_mode == "shared_library") { 106 if (component_mode == "shared_library") {
106 public_configs += [ ":protobuf_use_dlls" ] 107 public_configs += [ ":protobuf_use_dlls" ]
107 defines = [ "LIBPROTOBUF_EXPORTS" ] 108 defines = [ "LIBPROTOBUF_EXPORTS" ]
108 } 109 }
109 } 110 }
110 111
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 "src/google/protobuf/io/zero_copy_stream_impl.cc", 170 "src/google/protobuf/io/zero_copy_stream_impl.cc",
170 "src/google/protobuf/compiler/importer.cc", 171 "src/google/protobuf/compiler/importer.cc",
171 "src/google/protobuf/compiler/parser.cc", 172 "src/google/protobuf/compiler/parser.cc",
172 ] 173 ]
173 174
174 configs -= [ "//build/config/compiler:chromium_code" ] 175 configs -= [ "//build/config/compiler:chromium_code" ]
175 configs += [ "//build/config/compiler:no_chromium_code" ] 176 configs += [ "//build/config/compiler:no_chromium_code" ]
176 if (is_win) { 177 if (is_win) {
177 configs -= [ "//build/config/win:lean_and_mean" ] 178 configs -= [ "//build/config/win:lean_and_mean" ]
178 } 179 }
179 public_configs = [ 180 public_configs = [ ":protobuf_config" ]
180 ":protobuf_config",
181 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
182 "//build/config/compiler:no_size_t_to_int_warning",
183 ]
184 181
185 cflags = protobuf_lite_cflags 182 cflags = protobuf_lite_cflags
186 } 183 }
187 184
188 # Only compile the compiler for the host architecture. 185 # Only compile the compiler for the host architecture.
189 if (current_toolchain == host_toolchain) { 186 if (current_toolchain == host_toolchain) {
190 executable("protoc") { 187 executable("protoc") {
191 sources = [ 188 sources = [
192 "src/google/protobuf/compiler/code_generator.cc", 189 "src/google/protobuf/compiler/code_generator.cc",
193 "src/google/protobuf/compiler/command_line_interface.cc", 190 "src/google/protobuf/compiler/command_line_interface.cc",
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 252 }
256 253
257 cflags = protobuf_lite_cflags 254 cflags = protobuf_lite_cflags
258 255
259 deps = [ 256 deps = [
260 ":protobuf_full", 257 ":protobuf_full",
261 ] 258 ]
262 deps += [ "//build/config/sanitizers:deps" ] 259 deps += [ "//build/config/sanitizers:deps" ]
263 } 260 }
264 } 261 }
OLDNEW
« no previous file with comments | « third_party/ots/tools/ttf-checksum.py ('k') | third_party/qcms/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698