1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16THIRDPARTY_PROTOBUF_SUBSYS_NAME = "thirdparty" 17THIRDPARTY_PROTOBUF_PART_NAME = "protobuf" 18 19config("protobuf_config") { 20 include_dirs = [ "src" ] 21} 22 23ohos_shared_library("protobuf_lite") { 24 sources = [ 25 "src/google/protobuf/any_lite.cc", 26 "src/google/protobuf/arena.cc", 27 "src/google/protobuf/extension_set.cc", 28 "src/google/protobuf/generated_enum_util.cc", 29 "src/google/protobuf/generated_message_table_driven_lite.cc", 30 "src/google/protobuf/generated_message_util.cc", 31 "src/google/protobuf/implicit_weak_message.cc", 32 "src/google/protobuf/io/coded_stream.cc", 33 "src/google/protobuf/io/io_win32.cc", 34 "src/google/protobuf/io/strtod.cc", 35 "src/google/protobuf/io/zero_copy_stream.cc", 36 "src/google/protobuf/io/zero_copy_stream_impl.cc", 37 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 38 "src/google/protobuf/message_lite.cc", 39 "src/google/protobuf/parse_context.cc", 40 "src/google/protobuf/repeated_field.cc", 41 "src/google/protobuf/stubs/bytestream.cc", 42 "src/google/protobuf/stubs/common.cc", 43 "src/google/protobuf/stubs/int128.cc", 44 "src/google/protobuf/stubs/status.cc", 45 "src/google/protobuf/stubs/statusor.cc", 46 "src/google/protobuf/stubs/stringpiece.cc", 47 "src/google/protobuf/stubs/stringprintf.cc", 48 "src/google/protobuf/stubs/structurally_valid.cc", 49 "src/google/protobuf/stubs/strutil.cc", 50 "src/google/protobuf/stubs/time.cc", 51 "src/google/protobuf/wire_format_lite.cc", 52 ] 53 if (!is_asan && !is_debug) { 54 version_script = "libprotobuf_lite.map" 55 } 56 include_dirs = [ 57 "src/google/protobuf/**/*.h", 58 "src/google/protobuf/**/*.inc", 59 "src", 60 ] 61 if (!is_mingw) { 62 if (current_toolchain != host_toolchain) { 63 external_deps = [ "hilog:libhilog" ] 64 } 65 } else { 66 defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] 67 } 68 69 cflags_cc = [ "-Wno-sign-compare" ] 70 cflags = [ 71 "-Wno-sign-compare", 72 "-D HAVE_PTHREAD", 73 ] 74 75 public_configs = [ ":protobuf_config" ] 76 install_enable = true 77 innerapi_tags = [ "platformsdk_indirect" ] 78 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 79 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 80} 81 82ohos_static_library("protobuf_lite_static") { 83 sources = [ 84 "src/google/protobuf/any_lite.cc", 85 "src/google/protobuf/arena.cc", 86 "src/google/protobuf/extension_set.cc", 87 "src/google/protobuf/generated_enum_util.cc", 88 "src/google/protobuf/generated_message_table_driven_lite.cc", 89 "src/google/protobuf/generated_message_util.cc", 90 "src/google/protobuf/implicit_weak_message.cc", 91 "src/google/protobuf/io/coded_stream.cc", 92 "src/google/protobuf/io/io_win32.cc", 93 "src/google/protobuf/io/strtod.cc", 94 "src/google/protobuf/io/zero_copy_stream.cc", 95 "src/google/protobuf/io/zero_copy_stream_impl.cc", 96 "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 97 "src/google/protobuf/message_lite.cc", 98 "src/google/protobuf/parse_context.cc", 99 "src/google/protobuf/repeated_field.cc", 100 "src/google/protobuf/stubs/bytestream.cc", 101 "src/google/protobuf/stubs/common.cc", 102 "src/google/protobuf/stubs/int128.cc", 103 "src/google/protobuf/stubs/status.cc", 104 "src/google/protobuf/stubs/statusor.cc", 105 "src/google/protobuf/stubs/stringpiece.cc", 106 "src/google/protobuf/stubs/stringprintf.cc", 107 "src/google/protobuf/stubs/structurally_valid.cc", 108 "src/google/protobuf/stubs/strutil.cc", 109 "src/google/protobuf/stubs/time.cc", 110 "src/google/protobuf/wire_format_lite.cc", 111 ] 112 include_dirs = [ 113 "src/google/protobuf/**/*.h", 114 "src/google/protobuf/**/*.inc", 115 "src", 116 ] 117 if (!is_mingw) { 118 if (default_toolchain == current_toolchain) { 119 # target build, not host build 120 defines = [ "HAVE_HILOG" ] 121 external_deps = [ "hilog:libhilog" ] 122 } 123 } else { 124 defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] 125 } 126 127 cflags_cc = [ 128 "-Wno-sign-compare", 129 "-Wno-deprecated-declarations", 130 ] 131 cflags = [ 132 "-Wno-deprecated-declarations", 133 "-Wno-sign-compare", 134 "-D HAVE_PTHREAD", 135 ] 136 if (is_mingw) { 137 # ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] 138 cflags += [ "-Wno-macro-redefined" ] 139 } 140 public_configs = [ ":protobuf_config" ] 141 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 142 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 143} 144 145ohos_shared_library("protobuf") { 146 sources = [ 147 "src/google/protobuf/any.cc", 148 "src/google/protobuf/any.pb.cc", 149 "src/google/protobuf/api.pb.cc", 150 "src/google/protobuf/compiler/importer.cc", 151 "src/google/protobuf/compiler/parser.cc", 152 "src/google/protobuf/descriptor.cc", 153 "src/google/protobuf/descriptor.pb.cc", 154 "src/google/protobuf/descriptor_database.cc", 155 "src/google/protobuf/duration.pb.cc", 156 "src/google/protobuf/dynamic_message.cc", 157 "src/google/protobuf/empty.pb.cc", 158 "src/google/protobuf/extension_set_heavy.cc", 159 "src/google/protobuf/field_mask.pb.cc", 160 "src/google/protobuf/generated_message_reflection.cc", 161 "src/google/protobuf/generated_message_table_driven.cc", 162 "src/google/protobuf/io/gzip_stream.cc", 163 "src/google/protobuf/io/printer.cc", 164 "src/google/protobuf/io/tokenizer.cc", 165 "src/google/protobuf/map_field.cc", 166 "src/google/protobuf/message.cc", 167 "src/google/protobuf/reflection_ops.cc", 168 "src/google/protobuf/service.cc", 169 "src/google/protobuf/source_context.pb.cc", 170 "src/google/protobuf/struct.pb.cc", 171 "src/google/protobuf/stubs/substitute.cc", 172 "src/google/protobuf/text_format.cc", 173 "src/google/protobuf/timestamp.pb.cc", 174 "src/google/protobuf/type.pb.cc", 175 "src/google/protobuf/unknown_field_set.cc", 176 "src/google/protobuf/util/delimited_message_util.cc", 177 "src/google/protobuf/util/field_comparator.cc", 178 "src/google/protobuf/util/field_mask_util.cc", 179 "src/google/protobuf/util/internal/datapiece.cc", 180 "src/google/protobuf/util/internal/default_value_objectwriter.cc", 181 "src/google/protobuf/util/internal/error_listener.cc", 182 "src/google/protobuf/util/internal/field_mask_utility.cc", 183 "src/google/protobuf/util/internal/json_escaping.cc", 184 "src/google/protobuf/util/internal/json_objectwriter.cc", 185 "src/google/protobuf/util/internal/json_stream_parser.cc", 186 "src/google/protobuf/util/internal/object_writer.cc", 187 "src/google/protobuf/util/internal/proto_writer.cc", 188 "src/google/protobuf/util/internal/protostream_objectsource.cc", 189 "src/google/protobuf/util/internal/protostream_objectwriter.cc", 190 "src/google/protobuf/util/internal/type_info.cc", 191 "src/google/protobuf/util/internal/type_info_test_helper.cc", 192 "src/google/protobuf/util/internal/utility.cc", 193 "src/google/protobuf/util/json_util.cc", 194 "src/google/protobuf/util/message_differencer.cc", 195 "src/google/protobuf/util/time_util.cc", 196 "src/google/protobuf/util/type_resolver_util.cc", 197 "src/google/protobuf/wire_format.cc", 198 "src/google/protobuf/wrappers.pb.cc", 199 ] 200 include_dirs = [ 201 "src/google/protobuf/**/*.h", 202 "src/google/protobuf/**/*.inc", 203 "src", 204 ] 205 cflags_cc = [ 206 "-Wno-sign-compare", 207 "-Wno-deprecated-declarations", 208 ] 209 cflags = [ 210 "-Wno-sign-compare", 211 "-D HAVE_PTHREAD", 212 "-Wno-deprecated-declarations", 213 ] 214 215 deps = [ ":protobuf_lite" ] 216 if (!is_asan && !is_debug) { 217 version_script = "libprotobuf.map" 218 } 219 220 public_configs = [ ":protobuf_config" ] 221 install_enable = true 222 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 223 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 224} 225 226ohos_static_library("protobuf_static") { 227 sources = [ 228 "src/google/protobuf/any.cc", 229 "src/google/protobuf/any.pb.cc", 230 "src/google/protobuf/api.pb.cc", 231 "src/google/protobuf/compiler/importer.cc", 232 "src/google/protobuf/compiler/parser.cc", 233 "src/google/protobuf/descriptor.cc", 234 "src/google/protobuf/descriptor.pb.cc", 235 "src/google/protobuf/descriptor_database.cc", 236 "src/google/protobuf/duration.pb.cc", 237 "src/google/protobuf/dynamic_message.cc", 238 "src/google/protobuf/empty.pb.cc", 239 "src/google/protobuf/extension_set_heavy.cc", 240 "src/google/protobuf/field_mask.pb.cc", 241 "src/google/protobuf/generated_message_reflection.cc", 242 "src/google/protobuf/generated_message_table_driven.cc", 243 "src/google/protobuf/io/gzip_stream.cc", 244 "src/google/protobuf/io/printer.cc", 245 "src/google/protobuf/io/tokenizer.cc", 246 "src/google/protobuf/map_field.cc", 247 "src/google/protobuf/message.cc", 248 "src/google/protobuf/reflection_ops.cc", 249 "src/google/protobuf/service.cc", 250 "src/google/protobuf/source_context.pb.cc", 251 "src/google/protobuf/struct.pb.cc", 252 "src/google/protobuf/stubs/substitute.cc", 253 "src/google/protobuf/text_format.cc", 254 "src/google/protobuf/timestamp.pb.cc", 255 "src/google/protobuf/type.pb.cc", 256 "src/google/protobuf/unknown_field_set.cc", 257 "src/google/protobuf/util/delimited_message_util.cc", 258 "src/google/protobuf/util/field_comparator.cc", 259 "src/google/protobuf/util/field_mask_util.cc", 260 "src/google/protobuf/util/internal/datapiece.cc", 261 "src/google/protobuf/util/internal/default_value_objectwriter.cc", 262 "src/google/protobuf/util/internal/error_listener.cc", 263 "src/google/protobuf/util/internal/field_mask_utility.cc", 264 "src/google/protobuf/util/internal/json_escaping.cc", 265 "src/google/protobuf/util/internal/json_objectwriter.cc", 266 "src/google/protobuf/util/internal/json_stream_parser.cc", 267 "src/google/protobuf/util/internal/object_writer.cc", 268 "src/google/protobuf/util/internal/proto_writer.cc", 269 "src/google/protobuf/util/internal/protostream_objectsource.cc", 270 "src/google/protobuf/util/internal/protostream_objectwriter.cc", 271 "src/google/protobuf/util/internal/type_info.cc", 272 "src/google/protobuf/util/internal/type_info_test_helper.cc", 273 "src/google/protobuf/util/internal/utility.cc", 274 "src/google/protobuf/util/json_util.cc", 275 "src/google/protobuf/util/message_differencer.cc", 276 "src/google/protobuf/util/time_util.cc", 277 "src/google/protobuf/util/type_resolver_util.cc", 278 "src/google/protobuf/wire_format.cc", 279 "src/google/protobuf/wrappers.pb.cc", 280 ] 281 include_dirs = [ 282 "src/google/protobuf/**/*.h", 283 "src/google/protobuf/**/*.inc", 284 "src", 285 ] 286 cflags_cc = [ 287 "-Wno-sign-compare", 288 "-Wno-deprecated-declarations", 289 ] 290 cflags = [ 291 "-Wno-sign-compare", 292 "-D HAVE_PTHREAD", 293 "-Wno-deprecated-declarations", 294 ] 295 296 deps = [ ":protobuf_lite_static" ] 297 298 public_configs = [ ":protobuf_config" ] 299 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 300 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 301} 302 303if (current_toolchain == host_toolchain) { 304 ohos_shared_library("protoc_lib") { 305 sources = [ 306 "src/google/protobuf/compiler/code_generator.cc", 307 "src/google/protobuf/compiler/command_line_interface.cc", 308 "src/google/protobuf/compiler/cpp/cpp_enum.cc", 309 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 310 "src/google/protobuf/compiler/cpp/cpp_extension.cc", 311 "src/google/protobuf/compiler/cpp/cpp_field.cc", 312 "src/google/protobuf/compiler/cpp/cpp_file.cc", 313 "src/google/protobuf/compiler/cpp/cpp_generator.cc", 314 "src/google/protobuf/compiler/cpp/cpp_helpers.cc", 315 "src/google/protobuf/compiler/cpp/cpp_map_field.cc", 316 "src/google/protobuf/compiler/cpp/cpp_message.cc", 317 "src/google/protobuf/compiler/cpp/cpp_message_field.cc", 318 "src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", 319 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", 320 "src/google/protobuf/compiler/cpp/cpp_service.cc", 321 "src/google/protobuf/compiler/cpp/cpp_string_field.cc", 322 "src/google/protobuf/compiler/csharp/csharp_doc_comment.cc", 323 "src/google/protobuf/compiler/csharp/csharp_enum.cc", 324 "src/google/protobuf/compiler/csharp/csharp_enum_field.cc", 325 "src/google/protobuf/compiler/csharp/csharp_field_base.cc", 326 "src/google/protobuf/compiler/csharp/csharp_generator.cc", 327 "src/google/protobuf/compiler/csharp/csharp_helpers.cc", 328 "src/google/protobuf/compiler/csharp/csharp_map_field.cc", 329 "src/google/protobuf/compiler/csharp/csharp_message.cc", 330 "src/google/protobuf/compiler/csharp/csharp_message_field.cc", 331 "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", 332 "src/google/protobuf/compiler/csharp/csharp_reflection_class.cc", 333 "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", 334 "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", 335 "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", 336 "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", 337 "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", 338 "src/google/protobuf/compiler/java/java_context.cc", 339 "src/google/protobuf/compiler/java/java_doc_comment.cc", 340 "src/google/protobuf/compiler/java/java_enum.cc", 341 "src/google/protobuf/compiler/java/java_enum_field.cc", 342 "src/google/protobuf/compiler/java/java_enum_field_lite.cc", 343 "src/google/protobuf/compiler/java/java_enum_lite.cc", 344 "src/google/protobuf/compiler/java/java_extension.cc", 345 "src/google/protobuf/compiler/java/java_extension_lite.cc", 346 "src/google/protobuf/compiler/java/java_field.cc", 347 "src/google/protobuf/compiler/java/java_file.cc", 348 "src/google/protobuf/compiler/java/java_generator.cc", 349 "src/google/protobuf/compiler/java/java_generator_factory.cc", 350 "src/google/protobuf/compiler/java/java_helpers.cc", 351 "src/google/protobuf/compiler/java/java_map_field.cc", 352 "src/google/protobuf/compiler/java/java_map_field_lite.cc", 353 "src/google/protobuf/compiler/java/java_message.cc", 354 "src/google/protobuf/compiler/java/java_message_builder.cc", 355 "src/google/protobuf/compiler/java/java_message_builder_lite.cc", 356 "src/google/protobuf/compiler/java/java_message_field.cc", 357 "src/google/protobuf/compiler/java/java_message_field_lite.cc", 358 "src/google/protobuf/compiler/java/java_message_lite.cc", 359 "src/google/protobuf/compiler/java/java_name_resolver.cc", 360 "src/google/protobuf/compiler/java/java_primitive_field.cc", 361 "src/google/protobuf/compiler/java/java_primitive_field_lite.cc", 362 "src/google/protobuf/compiler/java/java_service.cc", 363 "src/google/protobuf/compiler/java/java_shared_code_generator.cc", 364 "src/google/protobuf/compiler/java/java_string_field.cc", 365 "src/google/protobuf/compiler/java/java_string_field_lite.cc", 366 "src/google/protobuf/compiler/js/js_generator.cc", 367 "src/google/protobuf/compiler/js/well_known_types_embed.cc", 368 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", 369 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", 370 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", 371 "src/google/protobuf/compiler/objectivec/objectivec_field.cc", 372 "src/google/protobuf/compiler/objectivec/objectivec_file.cc", 373 "src/google/protobuf/compiler/objectivec/objectivec_generator.cc", 374 "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", 375 "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", 376 "src/google/protobuf/compiler/objectivec/objectivec_message.cc", 377 "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", 378 "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", 379 "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", 380 "src/google/protobuf/compiler/php/php_generator.cc", 381 "src/google/protobuf/compiler/plugin.cc", 382 "src/google/protobuf/compiler/plugin.pb.cc", 383 "src/google/protobuf/compiler/python/python_generator.cc", 384 "src/google/protobuf/compiler/ruby/ruby_generator.cc", 385 "src/google/protobuf/compiler/subprocess.cc", 386 "src/google/protobuf/compiler/zip_writer.cc", 387 ] 388 include_dirs = [ 389 "src/google/protobuf/**/*.h", 390 "src/google/protobuf/**/*.inc", 391 "src", 392 ] 393 cflags_cc = [ 394 "-Wno-sign-compare", 395 "-Wno-unused-function", 396 "-Wno-unused-private-field", 397 "-Wno-deprecated-declarations", 398 ] 399 cflags = [ 400 "-Wno-sign-compare", 401 "-D HAVE_PTHREAD", 402 "-Wno-unused-function", 403 "-Wno-deprecated-declarations", 404 ] 405 406 deps = [ 407 ":protobuf", 408 ":protobuf_lite", 409 ] 410 411 public_configs = [ ":protobuf_config" ] 412 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 413 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 414 } 415 416 ohos_static_library("protoc_static_lib") { 417 sources = [ 418 "src/google/protobuf/compiler/code_generator.cc", 419 "src/google/protobuf/compiler/command_line_interface.cc", 420 "src/google/protobuf/compiler/cpp/cpp_enum.cc", 421 "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", 422 "src/google/protobuf/compiler/cpp/cpp_extension.cc", 423 "src/google/protobuf/compiler/cpp/cpp_field.cc", 424 "src/google/protobuf/compiler/cpp/cpp_file.cc", 425 "src/google/protobuf/compiler/cpp/cpp_generator.cc", 426 "src/google/protobuf/compiler/cpp/cpp_helpers.cc", 427 "src/google/protobuf/compiler/cpp/cpp_map_field.cc", 428 "src/google/protobuf/compiler/cpp/cpp_message.cc", 429 "src/google/protobuf/compiler/cpp/cpp_message_field.cc", 430 "src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", 431 "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", 432 "src/google/protobuf/compiler/cpp/cpp_service.cc", 433 "src/google/protobuf/compiler/cpp/cpp_string_field.cc", 434 "src/google/protobuf/compiler/csharp/csharp_doc_comment.cc", 435 "src/google/protobuf/compiler/csharp/csharp_enum.cc", 436 "src/google/protobuf/compiler/csharp/csharp_enum_field.cc", 437 "src/google/protobuf/compiler/csharp/csharp_field_base.cc", 438 "src/google/protobuf/compiler/csharp/csharp_generator.cc", 439 "src/google/protobuf/compiler/csharp/csharp_helpers.cc", 440 "src/google/protobuf/compiler/csharp/csharp_map_field.cc", 441 "src/google/protobuf/compiler/csharp/csharp_message.cc", 442 "src/google/protobuf/compiler/csharp/csharp_message_field.cc", 443 "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", 444 "src/google/protobuf/compiler/csharp/csharp_reflection_class.cc", 445 "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", 446 "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", 447 "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", 448 "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", 449 "src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", 450 "src/google/protobuf/compiler/java/java_context.cc", 451 "src/google/protobuf/compiler/java/java_doc_comment.cc", 452 "src/google/protobuf/compiler/java/java_enum.cc", 453 "src/google/protobuf/compiler/java/java_enum_field.cc", 454 "src/google/protobuf/compiler/java/java_enum_field_lite.cc", 455 "src/google/protobuf/compiler/java/java_enum_lite.cc", 456 "src/google/protobuf/compiler/java/java_extension.cc", 457 "src/google/protobuf/compiler/java/java_extension_lite.cc", 458 "src/google/protobuf/compiler/java/java_field.cc", 459 "src/google/protobuf/compiler/java/java_file.cc", 460 "src/google/protobuf/compiler/java/java_generator.cc", 461 "src/google/protobuf/compiler/java/java_generator_factory.cc", 462 "src/google/protobuf/compiler/java/java_helpers.cc", 463 "src/google/protobuf/compiler/java/java_map_field.cc", 464 "src/google/protobuf/compiler/java/java_map_field_lite.cc", 465 "src/google/protobuf/compiler/java/java_message.cc", 466 "src/google/protobuf/compiler/java/java_message_builder.cc", 467 "src/google/protobuf/compiler/java/java_message_builder_lite.cc", 468 "src/google/protobuf/compiler/java/java_message_field.cc", 469 "src/google/protobuf/compiler/java/java_message_field_lite.cc", 470 "src/google/protobuf/compiler/java/java_message_lite.cc", 471 "src/google/protobuf/compiler/java/java_name_resolver.cc", 472 "src/google/protobuf/compiler/java/java_primitive_field.cc", 473 "src/google/protobuf/compiler/java/java_primitive_field_lite.cc", 474 "src/google/protobuf/compiler/java/java_service.cc", 475 "src/google/protobuf/compiler/java/java_shared_code_generator.cc", 476 "src/google/protobuf/compiler/java/java_string_field.cc", 477 "src/google/protobuf/compiler/java/java_string_field_lite.cc", 478 "src/google/protobuf/compiler/js/js_generator.cc", 479 "src/google/protobuf/compiler/js/well_known_types_embed.cc", 480 "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", 481 "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", 482 "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", 483 "src/google/protobuf/compiler/objectivec/objectivec_field.cc", 484 "src/google/protobuf/compiler/objectivec/objectivec_file.cc", 485 "src/google/protobuf/compiler/objectivec/objectivec_generator.cc", 486 "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", 487 "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", 488 "src/google/protobuf/compiler/objectivec/objectivec_message.cc", 489 "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", 490 "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", 491 "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", 492 "src/google/protobuf/compiler/php/php_generator.cc", 493 "src/google/protobuf/compiler/plugin.cc", 494 "src/google/protobuf/compiler/plugin.pb.cc", 495 "src/google/protobuf/compiler/python/python_generator.cc", 496 "src/google/protobuf/compiler/ruby/ruby_generator.cc", 497 "src/google/protobuf/compiler/subprocess.cc", 498 "src/google/protobuf/compiler/zip_writer.cc", 499 ] 500 include_dirs = [ 501 "src/google/protobuf/**/*.h", 502 "src/google/protobuf/**/*.inc", 503 "src", 504 ] 505 cflags_cc = [ 506 "-Wno-sign-compare", 507 "-Wno-unused-function", 508 "-Wno-unused-private-field", 509 "-Wno-deprecated-declarations", 510 ] 511 cflags = [ 512 "-Wno-sign-compare", 513 "-D HAVE_PTHREAD", 514 "-Wno-unused-function", 515 "-Wno-deprecated-declarations", 516 ] 517 518 deps = [ 519 ":protobuf_lite_static", 520 ":protobuf_static", 521 ] 522 523 public_configs = [ ":protobuf_config" ] 524 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 525 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 526 } 527} 528 529# Only compile the plugin for the host architecture. 530if (current_toolchain == host_toolchain) { 531 ohos_executable("protoc") { 532 sources = [ "src/google/protobuf/compiler/main.cc" ] 533 include_dirs = [ 534 "src/google/protobuf/**/*.h", 535 "src/google/protobuf/**/*.inc", 536 "src", 537 ] 538 deps = [ ":protoc_static_lib" ] 539 cflags_cc = [ 540 "-Wno-sign-compare", 541 "-Wno-deprecated-declarations", 542 ] 543 cflags = [ 544 "-Wno-sign-compare", 545 "-D HAVE_PTHREAD", 546 "-Wno-deprecated-declarations", 547 ] 548 subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" 549 part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" 550 } 551} 552