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

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

Issue 960413003: Apply gn format with 'sources' sorting to src/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-format-sort-2
Patch Set: . Created 5 years, 10 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
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
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 component("protobuf_lite") { 88 component("protobuf_lite") {
89 sources = protobuf_lite_sources 89 sources = protobuf_lite_sources
90 90
91 configs -= [ "//build/config/compiler:chromium_code" ] 91 configs -= [ "//build/config/compiler:chromium_code" ]
92 configs += [ "//build/config/compiler:no_chromium_code" ] 92 configs += [ "//build/config/compiler:no_chromium_code" ]
93 if (is_win) { 93 if (is_win) {
94 configs -= [ "//build/config/win:lean_and_mean" ] 94 configs -= [ "//build/config/win:lean_and_mean" ]
95 } 95 }
96 public_configs = [ 96 public_configs = [
97 ":protobuf_config", 97 ":protobuf_config",
98
98 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 99 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
99 "//build/config/compiler:no_size_t_to_int_warning", 100 "//build/config/compiler:no_size_t_to_int_warning",
100 ] 101 ]
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
111 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't 112 # This is the full, heavy protobuf lib that's needed for c++ .protos that don't
112 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls 113 # specify the LITE_RUNTIME option. The protocol compiler itself (protoc) falls
113 # into that category. Do not use in Chrome code. 114 # into that category. Do not use in Chrome code.
114 115
115 source_set("protobuf_full") { 116 source_set("protobuf_full") {
116 # Prevent people from depending on this outside our file. 117 # Prevent people from depending on this outside our file.
117 visibility = [ ":*" ] 118 visibility = [ ":*" ]
118 119
119 sources = protobuf_lite_sources 120 sources = protobuf_lite_sources
120 sources += [ 121 sources += [
121 "src/google/protobuf/descriptor.h",
122 "src/google/protobuf/descriptor.pb.h",
123 "src/google/protobuf/descriptor_database.h",
124 "src/google/protobuf/dynamic_message.h",
125 "src/google/protobuf/generated_enum_reflection.h",
126 "src/google/protobuf/generated_message_reflection.h",
127 "src/google/protobuf/message.h",
128 "src/google/protobuf/reflection_ops.h",
129 "src/google/protobuf/service.h",
130 "src/google/protobuf/text_format.h",
131 "src/google/protobuf/wire_format.h",
132 "src/google/protobuf/io/gzip_stream.h",
133 "src/google/protobuf/io/printer.h",
134 "src/google/protobuf/io/tokenizer.h",
135 "src/google/protobuf/io/zero_copy_stream_impl.h",
136 "src/google/protobuf/compiler/code_generator.h", 122 "src/google/protobuf/compiler/code_generator.h",
137 "src/google/protobuf/compiler/command_line_interface.h", 123 "src/google/protobuf/compiler/command_line_interface.h",
138 "src/google/protobuf/compiler/importer.h", 124 "src/google/protobuf/compiler/importer.h",
139 "src/google/protobuf/compiler/java/java_doc_comment.cc", 125 "src/google/protobuf/compiler/java/java_doc_comment.cc",
140 "src/google/protobuf/compiler/java/java_doc_comment.h", 126 "src/google/protobuf/compiler/java/java_doc_comment.h",
141 "src/google/protobuf/compiler/parser.h", 127 "src/google/protobuf/compiler/parser.h",
128 "src/google/protobuf/descriptor.cc",
129 "src/google/protobuf/descriptor.h",
130 "src/google/protobuf/descriptor.pb.cc",
131 "src/google/protobuf/descriptor.pb.h",
132 "src/google/protobuf/descriptor_database.cc",
133 "src/google/protobuf/descriptor_database.h",
134 "src/google/protobuf/dynamic_message.cc",
135 "src/google/protobuf/dynamic_message.h",
136 "src/google/protobuf/extension_set_heavy.cc",
137 "src/google/protobuf/generated_enum_reflection.h",
138 "src/google/protobuf/generated_message_reflection.cc",
139 "src/google/protobuf/generated_message_reflection.h",
140 "src/google/protobuf/io/gzip_stream.h",
141 "src/google/protobuf/io/printer.h",
142 "src/google/protobuf/io/tokenizer.h",
143 "src/google/protobuf/io/zero_copy_stream_impl.h",
144 "src/google/protobuf/message.cc",
145 "src/google/protobuf/message.h",
146 "src/google/protobuf/reflection_ops.cc",
147 "src/google/protobuf/reflection_ops.h",
148 "src/google/protobuf/service.cc",
149 "src/google/protobuf/service.h",
150 "src/google/protobuf/stubs/stl_util.h",
151 "src/google/protobuf/stubs/stringprintf.cc",
152 "src/google/protobuf/stubs/stringprintf.h",
153 "src/google/protobuf/stubs/structurally_valid.cc",
142 "src/google/protobuf/stubs/strutil.cc", 154 "src/google/protobuf/stubs/strutil.cc",
143 "src/google/protobuf/stubs/strutil.h", 155 "src/google/protobuf/stubs/strutil.h",
144 "src/google/protobuf/stubs/substitute.cc", 156 "src/google/protobuf/stubs/substitute.cc",
145 "src/google/protobuf/stubs/substitute.h", 157 "src/google/protobuf/stubs/substitute.h",
146 "src/google/protobuf/stubs/stl_util.h",
147 "src/google/protobuf/stubs/stringprintf.cc",
148 "src/google/protobuf/stubs/stringprintf.h",
149 "src/google/protobuf/stubs/structurally_valid.cc",
150 "src/google/protobuf/stubs/template_util.h", 158 "src/google/protobuf/stubs/template_util.h",
151 "src/google/protobuf/stubs/type_traits.h", 159 "src/google/protobuf/stubs/type_traits.h",
152 "src/google/protobuf/descriptor.cc",
153 "src/google/protobuf/descriptor.pb.cc",
154 "src/google/protobuf/descriptor_database.cc",
155 "src/google/protobuf/dynamic_message.cc",
156 "src/google/protobuf/extension_set_heavy.cc",
157 "src/google/protobuf/generated_message_reflection.cc",
158 "src/google/protobuf/message.cc",
159 "src/google/protobuf/reflection_ops.cc",
160 "src/google/protobuf/service.cc",
161 "src/google/protobuf/text_format.cc", 160 "src/google/protobuf/text_format.cc",
161 "src/google/protobuf/text_format.h",
162 "src/google/protobuf/wire_format.cc", 162 "src/google/protobuf/wire_format.cc",
163 "src/google/protobuf/wire_format.h",
163 164
164 # This file pulls in zlib, but it's not actually used by protoc, so 165 # This file pulls in zlib, but it's not actually used by protoc, so
165 # instead of compiling zlib for the host, let's just exclude this. 166 # instead of compiling zlib for the host, let's just exclude this.
166 # "src/src/google/protobuf/io/gzip_stream.cc", 167 # "src/src/google/protobuf/io/gzip_stream.cc",
168 "src/google/protobuf/compiler/importer.cc",
169 "src/google/protobuf/compiler/parser.cc",
167 "src/google/protobuf/io/printer.cc", 170 "src/google/protobuf/io/printer.cc",
168 "src/google/protobuf/io/tokenizer.cc", 171 "src/google/protobuf/io/tokenizer.cc",
169 "src/google/protobuf/io/zero_copy_stream_impl.cc", 172 "src/google/protobuf/io/zero_copy_stream_impl.cc",
170 "src/google/protobuf/compiler/importer.cc",
171 "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 = [
180 ":protobuf_config", 181 ":protobuf_config",
182
181 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 183 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
182 "//build/config/compiler:no_size_t_to_int_warning", 184 "//build/config/compiler:no_size_t_to_int_warning",
183 ] 185 ]
184 186
185 cflags = protobuf_lite_cflags 187 cflags = protobuf_lite_cflags
186 } 188 }
187 189
188 # Only compile the compiler for the host architecture. 190 # Only compile the compiler for the host architecture.
189 if (current_toolchain == host_toolchain) { 191 if (current_toolchain == host_toolchain) {
190 executable("protoc") { 192 executable("protoc") {
191 sources = [ 193 sources = [
192 "src/google/protobuf/compiler/code_generator.cc", 194 "src/google/protobuf/compiler/code_generator.cc",
193 "src/google/protobuf/compiler/command_line_interface.cc", 195 "src/google/protobuf/compiler/command_line_interface.cc",
194 "src/google/protobuf/compiler/plugin.cc",
195 "src/google/protobuf/compiler/plugin.pb.cc",
196 "src/google/protobuf/compiler/subprocess.cc",
197 "src/google/protobuf/compiler/subprocess.h",
198 "src/google/protobuf/compiler/zip_writer.cc",
199 "src/google/protobuf/compiler/zip_writer.h",
200 "src/google/protobuf/compiler/cpp/cpp_enum.cc", 196 "src/google/protobuf/compiler/cpp/cpp_enum.cc",
201 "src/google/protobuf/compiler/cpp/cpp_enum.h", 197 "src/google/protobuf/compiler/cpp/cpp_enum.h",
202 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 198 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc",
203 "src/google/protobuf/compiler/cpp/cpp_enum_field.h", 199 "src/google/protobuf/compiler/cpp/cpp_enum_field.h",
204 "src/google/protobuf/compiler/cpp/cpp_extension.cc", 200 "src/google/protobuf/compiler/cpp/cpp_extension.cc",
205 "src/google/protobuf/compiler/cpp/cpp_extension.h", 201 "src/google/protobuf/compiler/cpp/cpp_extension.h",
206 "src/google/protobuf/compiler/cpp/cpp_field.cc", 202 "src/google/protobuf/compiler/cpp/cpp_field.cc",
207 "src/google/protobuf/compiler/cpp/cpp_field.h", 203 "src/google/protobuf/compiler/cpp/cpp_field.h",
208 "src/google/protobuf/compiler/cpp/cpp_file.cc", 204 "src/google/protobuf/compiler/cpp/cpp_file.cc",
209 "src/google/protobuf/compiler/cpp/cpp_file.h", 205 "src/google/protobuf/compiler/cpp/cpp_file.h",
(...skipping 26 matching lines...) Expand all
236 "src/google/protobuf/compiler/java/java_message.cc", 232 "src/google/protobuf/compiler/java/java_message.cc",
237 "src/google/protobuf/compiler/java/java_message.h", 233 "src/google/protobuf/compiler/java/java_message.h",
238 "src/google/protobuf/compiler/java/java_message_field.cc", 234 "src/google/protobuf/compiler/java/java_message_field.cc",
239 "src/google/protobuf/compiler/java/java_message_field.h", 235 "src/google/protobuf/compiler/java/java_message_field.h",
240 "src/google/protobuf/compiler/java/java_primitive_field.cc", 236 "src/google/protobuf/compiler/java/java_primitive_field.cc",
241 "src/google/protobuf/compiler/java/java_primitive_field.h", 237 "src/google/protobuf/compiler/java/java_primitive_field.h",
242 "src/google/protobuf/compiler/java/java_service.cc", 238 "src/google/protobuf/compiler/java/java_service.cc",
243 "src/google/protobuf/compiler/java/java_service.h", 239 "src/google/protobuf/compiler/java/java_service.h",
244 "src/google/protobuf/compiler/java/java_string_field.cc", 240 "src/google/protobuf/compiler/java/java_string_field.cc",
245 "src/google/protobuf/compiler/java/java_string_field.h", 241 "src/google/protobuf/compiler/java/java_string_field.h",
242 "src/google/protobuf/compiler/main.cc",
243 "src/google/protobuf/compiler/plugin.cc",
244 "src/google/protobuf/compiler/plugin.pb.cc",
246 "src/google/protobuf/compiler/python/python_generator.cc", 245 "src/google/protobuf/compiler/python/python_generator.cc",
247 "src/google/protobuf/compiler/main.cc", 246 "src/google/protobuf/compiler/subprocess.cc",
247 "src/google/protobuf/compiler/subprocess.h",
248 "src/google/protobuf/compiler/zip_writer.cc",
249 "src/google/protobuf/compiler/zip_writer.h",
248 ] 250 ]
249 251
250 configs -= [ "//build/config/compiler:chromium_code" ] 252 configs -= [ "//build/config/compiler:chromium_code" ]
251 configs += [ "//build/config/compiler:no_chromium_code" ] 253 configs += [ "//build/config/compiler:no_chromium_code" ]
252 if (is_win) { 254 if (is_win) {
253 # This is defined internally, don't warn on duplicate. 255 # This is defined internally, don't warn on duplicate.
254 configs -= [ "//build/config/win:lean_and_mean" ] 256 configs -= [ "//build/config/win:lean_and_mean" ]
255 } 257 }
256 258
257 cflags = protobuf_lite_cflags 259 cflags = protobuf_lite_cflags
258 260
259 deps = [ 261 deps = [
260 ":protobuf_full", 262 ":protobuf_full",
261 ] 263 ]
262 deps += [ "//build/config/sanitizers:deps" ] 264 deps += [ "//build/config/sanitizers:deps" ]
263 } 265 }
264 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698