From 996fdb2f4f6a386389398e77dac505c6a30f9540 Mon Sep 17 00:00:00 2001 From: ganchuantao1 Date: Wed, 19 Feb 2025 20:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=20=20=20=20arkcomplier=20toolchain=20=E9=80=82?= =?UTF-8?q?=E9=85=8Dprotobuf=20=20=20=20=20Signed-off-by:ganchuantao1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao1 --- build/templates/cxx/external_deps_handler.py | 5 + build/third_party_gn/abseil-cpp/BUILD.gn | 535 +++++++++++++++++ .../abseil-cpp/dummy_bundle.json | 15 + build/third_party_gn/protobuf/BUILD.gn | 563 ++++++------------ 4 files changed, 743 insertions(+), 375 deletions(-) create mode 100644 build/third_party_gn/abseil-cpp/BUILD.gn create mode 100644 build/third_party_gn/abseil-cpp/dummy_bundle.json diff --git a/build/templates/cxx/external_deps_handler.py b/build/templates/cxx/external_deps_handler.py index 6577eae4..76a59ca5 100755 --- a/build/templates/cxx/external_deps_handler.py +++ b/build/templates/cxx/external_deps_handler.py @@ -144,6 +144,11 @@ def main(): "protobuf/dummy_bundle.json".format(args.root_src_dir)) target_name = dep.split(":")[1] deps.append(get_full_path_from_target_name(config_info, target_name)) + elif dep.startswith("abseil-cpp"): + config_info = read_json_file("{}arkcompiler/toolchain/build/third_party_gn/" \ + "abseil-cpp/dummy_bundle.json".format(args.root_src_dir)) + target_name = dep.split(":")[1] + deps.append(get_full_path_from_target_name(config_info, target_name)) else: print("Component in which the external_dep defined is ommited in the logic of {}!".format(__file__)) sys.exit(1) diff --git a/build/third_party_gn/abseil-cpp/BUILD.gn b/build/third_party_gn/abseil-cpp/BUILD.gn new file mode 100644 index 00000000..f6399dcd --- /dev/null +++ b/build/third_party_gn/abseil-cpp/BUILD.gn @@ -0,0 +1,535 @@ +# Copyright (c) 2021-2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//developtools/profiler/build/config.gni") +import("$build_root/ark.gni") + +libabseil_path = rebase_path("//third_party/abseil-cpp") +print("$libabseil_path") +exec_script("$libabseil_path/install.sh", [ "$libabseil_path" ]) + +ABSEIL_DIR = "//third_party/abseil-cpp/abseil-cpp" + +THIRDPARTY_ABSEIL_SUBSYS_NAME = "thirdparty" +THIRDPARTY_ABSEIL_PART_NAME = "abseil-cpp" + +config("absl_public_config") { + include_dirs = [ "${ABSEIL_DIR}/" ] +} + +config("cflags_config") { + cflags = [ + "-Wall", + "-Wextra", + "-Weverything", + "-Wno-c++98-compat-pedantic", + "-Wno-conversion", + "-Wno-covered-switch-default", + "-Wno-deprecated", + "-Wno-disabled-macro-expansion", + "-Wno-double-promotion", + "-Wno-comma", + "-Wno-extra-semi", + "-Wno-extra-semi-stmt", + "-Wno-packed", + "-Wno-padded", + "-Wno-sign-compare", + "-Wno-float-conversion", + "-Wno-float-equal", + "-Wno-format-nonliteral", + "-Wno-gcc-compat", + "-Wno-global-constructors", + "-Wno-exit-time-destructors", + "-Wno-non-modular-include-in-module", + "-Wno-old-style-cast", + "-Wno-range-loop-analysis", + "-Wno-reserved-id-macro", + "-Wno-shorten-64-to-32", + "-Wno-switch-enum", + "-Wno-thread-safety-negative", + "-Wno-unknown-warning-option", + "-Wno-unreachable-code", + "-Wno-unused-macros", + "-Wno-weak-vtables", + "-Wno-zero-as-null-pointer-constant", + "-Wbitfield-enum-conversion", + "-Wbool-conversion", + "-Wconstant-conversion", + "-Wenum-conversion", + "-Wint-conversion", + "-Wliteral-conversion", + "-Wnon-literal-null-conversion", + "-Wnull-conversion", + "-Wobjc-literal-conversion", + "-Wno-sign-conversion", + "-Wstring-conversion", + "-DNOMINMAX", + "-Wno-reserved-identifier", + "-Wno-unused-template", + "-Wno-unknown-pragmas", + "-Wno-c++17-attribute-extensions", + "-Wno-cast-function-type", + "-Wno-atomic-implicit-seq-cst", + "-Wno-unreachable-code-break", + "-Wno-unreachable-code-return", + "-Wno-missing-noreturn", + "-Wno-tautological-type-limit-compare", + ] + + # Adapating DEBUG version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines = [ "NDEBUG" ] +} + +ohos_static_library("absl_base_static") { + sources = [ + "${ABSEIL_DIR}/absl/algorithm/algorithm.h", + "${ABSEIL_DIR}/absl/algorithm/container.h", + "${ABSEIL_DIR}/absl/base/attributes.h", + "${ABSEIL_DIR}/absl/base/call_once.h", + "${ABSEIL_DIR}/absl/base/casts.h", + "${ABSEIL_DIR}/absl/base/config.h", + "${ABSEIL_DIR}/absl/base/const_init.h", + "${ABSEIL_DIR}/absl/base/dynamic_annotations.h", + "${ABSEIL_DIR}/absl/base/internal/atomic_hook.h", + "${ABSEIL_DIR}/absl/base/internal/cycleclock.cc", + "${ABSEIL_DIR}/absl/base/internal/cycleclock.h", + "${ABSEIL_DIR}/absl/base/internal/cycleclock_config.h", + "${ABSEIL_DIR}/absl/base/internal/direct_mmap.h", + "${ABSEIL_DIR}/absl/base/internal/dynamic_annotations.h", + "${ABSEIL_DIR}/absl/base/internal/endian.h", + "${ABSEIL_DIR}/absl/base/internal/errno_saver.h", + "${ABSEIL_DIR}/absl/base/internal/fast_type_id.h", + "${ABSEIL_DIR}/absl/base/internal/hide_ptr.h", + "${ABSEIL_DIR}/absl/base/internal/identity.h", + "${ABSEIL_DIR}/absl/base/internal/inline_variable.h", + "${ABSEIL_DIR}/absl/base/internal/invoke.h", + "${ABSEIL_DIR}/absl/base/internal/low_level_alloc.cc", + "${ABSEIL_DIR}/absl/base/internal/low_level_alloc.h", + "${ABSEIL_DIR}/absl/base/internal/low_level_scheduling.h", + "${ABSEIL_DIR}/absl/base/internal/nullability_impl.h", + "${ABSEIL_DIR}/absl/base/internal/per_thread_tls.h", + "${ABSEIL_DIR}/absl/base/internal/prefetch.h", + "${ABSEIL_DIR}/absl/base/internal/pretty_function.h", + "${ABSEIL_DIR}/absl/base/internal/raw_logging.cc", + "${ABSEIL_DIR}/absl/base/internal/raw_logging.h", + "${ABSEIL_DIR}/absl/base/internal/scheduling_mode.h", + "${ABSEIL_DIR}/absl/base/internal/scoped_set_env.cc", + "${ABSEIL_DIR}/absl/base/internal/scoped_set_env.h", + "${ABSEIL_DIR}/absl/base/internal/spinlock.cc", + "${ABSEIL_DIR}/absl/base/internal/spinlock.h", + "${ABSEIL_DIR}/absl/base/internal/spinlock_wait.cc", + "${ABSEIL_DIR}/absl/base/internal/spinlock_wait.h", + "${ABSEIL_DIR}/absl/base/internal/strerror.cc", + "${ABSEIL_DIR}/absl/base/internal/strerror.h", + "${ABSEIL_DIR}/absl/base/internal/sysinfo.cc", + "${ABSEIL_DIR}/absl/base/internal/sysinfo.h", + "${ABSEIL_DIR}/absl/base/internal/thread_annotations.h", + "${ABSEIL_DIR}/absl/base/internal/thread_identity.cc", + "${ABSEIL_DIR}/absl/base/internal/thread_identity.h", + "${ABSEIL_DIR}/absl/base/internal/throw_delegate.cc", + "${ABSEIL_DIR}/absl/base/internal/throw_delegate.h", + "${ABSEIL_DIR}/absl/base/internal/tsan_mutex_interface.h", + "${ABSEIL_DIR}/absl/base/internal/unaligned_access.h", + "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock.cc", + "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock.h", + "${ABSEIL_DIR}/absl/base/internal/unscaledcycleclock_config.h", + "${ABSEIL_DIR}/absl/base/log_severity.cc", + "${ABSEIL_DIR}/absl/base/log_severity.h", + "${ABSEIL_DIR}/absl/base/macros.h", + "${ABSEIL_DIR}/absl/base/nullability.h", + "${ABSEIL_DIR}/absl/base/optimization.h", + "${ABSEIL_DIR}/absl/base/options.h", + "${ABSEIL_DIR}/absl/base/policy_checks.h", + "${ABSEIL_DIR}/absl/base/port.h", + "${ABSEIL_DIR}/absl/base/prefetch.h", + "${ABSEIL_DIR}/absl/base/thread_annotations.h", + "${ABSEIL_DIR}/absl/cleanup/cleanup.h", + "${ABSEIL_DIR}/absl/cleanup/internal/cleanup.h", + "${ABSEIL_DIR}/absl/container/btree_map.h", + "${ABSEIL_DIR}/absl/container/btree_set.h", + "${ABSEIL_DIR}/absl/container/fixed_array.h", + "${ABSEIL_DIR}/absl/container/flat_hash_map.h", + "${ABSEIL_DIR}/absl/container/flat_hash_set.h", + "${ABSEIL_DIR}/absl/container/inlined_vector.h", + "${ABSEIL_DIR}/absl/container/internal/btree.h", + "${ABSEIL_DIR}/absl/container/internal/btree_container.h", + "${ABSEIL_DIR}/absl/container/internal/common.h", + "${ABSEIL_DIR}/absl/container/internal/common_policy_traits.h", + "${ABSEIL_DIR}/absl/container/internal/compressed_tuple.h", + "${ABSEIL_DIR}/absl/container/internal/container_memory.h", + "${ABSEIL_DIR}/absl/container/internal/counting_allocator.h", + "${ABSEIL_DIR}/absl/container/internal/hash_function_defaults.h", + "${ABSEIL_DIR}/absl/container/internal/hash_policy_traits.h", + "${ABSEIL_DIR}/absl/container/internal/hashtable_debug.h", + "${ABSEIL_DIR}/absl/container/internal/hashtable_debug_hooks.h", + "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler.cc", + "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler.h", + "${ABSEIL_DIR}/absl/container/internal/hashtablez_sampler_force_weak_definition.cc", + "${ABSEIL_DIR}/absl/container/internal/inlined_vector.h", + "${ABSEIL_DIR}/absl/container/internal/layout.h", + "${ABSEIL_DIR}/absl/container/internal/node_slot_policy.h", + "${ABSEIL_DIR}/absl/container/internal/raw_hash_map.h", + "${ABSEIL_DIR}/absl/container/internal/raw_hash_set.cc", + "${ABSEIL_DIR}/absl/container/internal/raw_hash_set.h", + "${ABSEIL_DIR}/absl/container/internal/tracked.h", + "${ABSEIL_DIR}/absl/container/node_hash_map.h", + "${ABSEIL_DIR}/absl/container/node_hash_set.h", + "${ABSEIL_DIR}/absl/crc/crc32c.cc", + "${ABSEIL_DIR}/absl/crc/crc32c.h", + "${ABSEIL_DIR}/absl/crc/internal/cpu_detect.cc", + "${ABSEIL_DIR}/absl/crc/internal/cpu_detect.h", + "${ABSEIL_DIR}/absl/crc/internal/crc.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc.h", + "${ABSEIL_DIR}/absl/crc/internal/crc32_x86_arm_combined_simd.h", + "${ABSEIL_DIR}/absl/crc/internal/crc32c.h", + "${ABSEIL_DIR}/absl/crc/internal/crc32c_inline.h", + "${ABSEIL_DIR}/absl/crc/internal/crc_cord_state.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc_cord_state.h", + "${ABSEIL_DIR}/absl/crc/internal/crc_internal.h", + "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy.h", + "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy_fallback.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc_memcpy_x86_64.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc_non_temporal_memcpy.cc", + "${ABSEIL_DIR}/absl/crc/internal/crc_x86_arm_combined.cc", + "${ABSEIL_DIR}/absl/crc/internal/non_temporal_arm_intrinsics.h", + "${ABSEIL_DIR}/absl/crc/internal/non_temporal_memcpy.h", + "${ABSEIL_DIR}/absl/debugging/failure_signal_handler.cc", + "${ABSEIL_DIR}/absl/debugging/failure_signal_handler.h", + "${ABSEIL_DIR}/absl/debugging/internal/address_is_readable.cc", + "${ABSEIL_DIR}/absl/debugging/internal/address_is_readable.h", + "${ABSEIL_DIR}/absl/debugging/internal/demangle.cc", + "${ABSEIL_DIR}/absl/debugging/internal/demangle.h", + "${ABSEIL_DIR}/absl/debugging/internal/elf_mem_image.cc", + "${ABSEIL_DIR}/absl/debugging/internal/elf_mem_image.h", + "${ABSEIL_DIR}/absl/debugging/internal/examine_stack.cc", + "${ABSEIL_DIR}/absl/debugging/internal/examine_stack.h", + "${ABSEIL_DIR}/absl/debugging/internal/stack_consumption.cc", + "${ABSEIL_DIR}/absl/debugging/internal/stack_consumption.h", + "${ABSEIL_DIR}/absl/debugging/internal/stacktrace_config.h", + "${ABSEIL_DIR}/absl/debugging/internal/symbolize.h", + "${ABSEIL_DIR}/absl/debugging/internal/vdso_support.cc", + "${ABSEIL_DIR}/absl/debugging/internal/vdso_support.h", + "${ABSEIL_DIR}/absl/debugging/leak_check.cc", + "${ABSEIL_DIR}/absl/debugging/leak_check.h", + "${ABSEIL_DIR}/absl/debugging/stacktrace.cc", + "${ABSEIL_DIR}/absl/debugging/stacktrace.h", + "${ABSEIL_DIR}/absl/debugging/symbolize.cc", + "${ABSEIL_DIR}/absl/debugging/symbolize.h", + "${ABSEIL_DIR}/absl/functional/any_invocable.h", + "${ABSEIL_DIR}/absl/functional/bind_front.h", + "${ABSEIL_DIR}/absl/functional/function_ref.h", + "${ABSEIL_DIR}/absl/functional/internal/any_invocable.h", + "${ABSEIL_DIR}/absl/functional/internal/front_binder.h", + "${ABSEIL_DIR}/absl/functional/internal/function_ref.h", + "${ABSEIL_DIR}/absl/hash/hash.h", + "${ABSEIL_DIR}/absl/hash/internal/city.cc", + "${ABSEIL_DIR}/absl/hash/internal/city.h", + "${ABSEIL_DIR}/absl/hash/internal/hash.cc", + "${ABSEIL_DIR}/absl/hash/internal/hash.h", + "${ABSEIL_DIR}/absl/hash/internal/low_level_hash.cc", + "${ABSEIL_DIR}/absl/hash/internal/low_level_hash.h", + "${ABSEIL_DIR}/absl/hash/internal/spy_hash_state.h", + "${ABSEIL_DIR}/absl/log/absl_check.h", + "${ABSEIL_DIR}/absl/log/absl_log.h", + "${ABSEIL_DIR}/absl/log/check.h", + "${ABSEIL_DIR}/absl/log/die_if_null.cc", + "${ABSEIL_DIR}/absl/log/die_if_null.h", + "${ABSEIL_DIR}/absl/log/globals.cc", + "${ABSEIL_DIR}/absl/log/globals.h", + "${ABSEIL_DIR}/absl/log/initialize.cc", + "${ABSEIL_DIR}/absl/log/initialize.h", + "${ABSEIL_DIR}/absl/log/internal/append_truncated.h", + "${ABSEIL_DIR}/absl/log/internal/check_impl.h", + "${ABSEIL_DIR}/absl/log/internal/check_op.cc", + "${ABSEIL_DIR}/absl/log/internal/check_op.h", + "${ABSEIL_DIR}/absl/log/internal/conditions.cc", + "${ABSEIL_DIR}/absl/log/internal/conditions.h", + "${ABSEIL_DIR}/absl/log/internal/config.h", + "${ABSEIL_DIR}/absl/log/internal/globals.cc", + "${ABSEIL_DIR}/absl/log/internal/globals.h", + "${ABSEIL_DIR}/absl/log/internal/log_format.cc", + "${ABSEIL_DIR}/absl/log/internal/log_format.h", + "${ABSEIL_DIR}/absl/log/internal/log_impl.h", + "${ABSEIL_DIR}/absl/log/internal/log_message.cc", + "${ABSEIL_DIR}/absl/log/internal/log_message.h", + "${ABSEIL_DIR}/absl/log/internal/log_sink_set.cc", + "${ABSEIL_DIR}/absl/log/internal/log_sink_set.h", + "${ABSEIL_DIR}/absl/log/internal/nullguard.cc", + "${ABSEIL_DIR}/absl/log/internal/nullguard.h", + "${ABSEIL_DIR}/absl/log/internal/nullstream.h", + "${ABSEIL_DIR}/absl/log/internal/proto.cc", + "${ABSEIL_DIR}/absl/log/internal/proto.h", + "${ABSEIL_DIR}/absl/log/internal/strip.h", + "${ABSEIL_DIR}/absl/log/internal/structured.h", + "${ABSEIL_DIR}/absl/log/internal/voidify.h", + "${ABSEIL_DIR}/absl/log/log.h", + "${ABSEIL_DIR}/absl/log/log_entry.cc", + "${ABSEIL_DIR}/absl/log/log_entry.h", + "${ABSEIL_DIR}/absl/log/log_sink.cc", + "${ABSEIL_DIR}/absl/log/log_sink.h", + "${ABSEIL_DIR}/absl/log/log_sink_registry.h", + "${ABSEIL_DIR}/absl/log/log_streamer.h", + "${ABSEIL_DIR}/absl/log/structured.h", + "${ABSEIL_DIR}/absl/memory/memory.h", + "${ABSEIL_DIR}/absl/meta/type_traits.h", + "${ABSEIL_DIR}/absl/numeric/bits.h", + "${ABSEIL_DIR}/absl/numeric/int128.cc", + "${ABSEIL_DIR}/absl/numeric/int128.h", + "${ABSEIL_DIR}/absl/numeric/internal/bits.h", + "${ABSEIL_DIR}/absl/numeric/internal/representation.h", + "${ABSEIL_DIR}/absl/profiling/internal/exponential_biased.cc", + "${ABSEIL_DIR}/absl/profiling/internal/exponential_biased.h", + "${ABSEIL_DIR}/absl/profiling/internal/periodic_sampler.cc", + "${ABSEIL_DIR}/absl/profiling/internal/periodic_sampler.h", + "${ABSEIL_DIR}/absl/profiling/internal/sample_recorder.h", + "${ABSEIL_DIR}/absl/random/bernoulli_distribution.h", + "${ABSEIL_DIR}/absl/random/beta_distribution.h", + "${ABSEIL_DIR}/absl/random/bit_gen_ref.h", + "${ABSEIL_DIR}/absl/random/discrete_distribution.cc", + "${ABSEIL_DIR}/absl/random/discrete_distribution.h", + "${ABSEIL_DIR}/absl/random/distributions.h", + "${ABSEIL_DIR}/absl/random/exponential_distribution.h", + "${ABSEIL_DIR}/absl/random/gaussian_distribution.cc", + "${ABSEIL_DIR}/absl/random/gaussian_distribution.h", + "${ABSEIL_DIR}/absl/random/internal/distribution_caller.h", + "${ABSEIL_DIR}/absl/random/internal/fast_uniform_bits.h", + "${ABSEIL_DIR}/absl/random/internal/fastmath.h", + "${ABSEIL_DIR}/absl/random/internal/generate_real.h", + "${ABSEIL_DIR}/absl/random/internal/iostream_state_saver.h", + "${ABSEIL_DIR}/absl/random/internal/nonsecure_base.h", + "${ABSEIL_DIR}/absl/random/internal/pcg_engine.h", + "${ABSEIL_DIR}/absl/random/internal/platform.h", + "${ABSEIL_DIR}/absl/random/internal/pool_urbg.cc", + "${ABSEIL_DIR}/absl/random/internal/pool_urbg.h", + "${ABSEIL_DIR}/absl/random/internal/randen.cc", + "${ABSEIL_DIR}/absl/random/internal/randen.h", + "${ABSEIL_DIR}/absl/random/internal/randen_detect.cc", + "${ABSEIL_DIR}/absl/random/internal/randen_detect.h", + "${ABSEIL_DIR}/absl/random/internal/randen_engine.h", + "${ABSEIL_DIR}/absl/random/internal/randen_hwaes.cc", + "${ABSEIL_DIR}/absl/random/internal/randen_hwaes.h", + "${ABSEIL_DIR}/absl/random/internal/randen_round_keys.cc", + "${ABSEIL_DIR}/absl/random/internal/randen_slow.cc", + "${ABSEIL_DIR}/absl/random/internal/randen_slow.h", + "${ABSEIL_DIR}/absl/random/internal/randen_traits.h", + "${ABSEIL_DIR}/absl/random/internal/salted_seed_seq.h", + "${ABSEIL_DIR}/absl/random/internal/seed_material.cc", + "${ABSEIL_DIR}/absl/random/internal/seed_material.h", + "${ABSEIL_DIR}/absl/random/internal/sequence_urbg.h", + "${ABSEIL_DIR}/absl/random/internal/traits.h", + "${ABSEIL_DIR}/absl/random/internal/uniform_helper.h", + "${ABSEIL_DIR}/absl/random/internal/wide_multiply.h", + "${ABSEIL_DIR}/absl/random/log_uniform_int_distribution.h", + "${ABSEIL_DIR}/absl/random/poisson_distribution.h", + "${ABSEIL_DIR}/absl/random/random.h", + "${ABSEIL_DIR}/absl/random/seed_gen_exception.cc", + "${ABSEIL_DIR}/absl/random/seed_gen_exception.h", + "${ABSEIL_DIR}/absl/random/seed_sequences.cc", + "${ABSEIL_DIR}/absl/random/seed_sequences.h", + "${ABSEIL_DIR}/absl/random/uniform_int_distribution.h", + "${ABSEIL_DIR}/absl/random/uniform_real_distribution.h", + "${ABSEIL_DIR}/absl/random/zipf_distribution.h", + "${ABSEIL_DIR}/absl/status/internal/status_internal.h", + "${ABSEIL_DIR}/absl/status/internal/statusor_internal.h", + "${ABSEIL_DIR}/absl/status/status.cc", + "${ABSEIL_DIR}/absl/status/status.h", + "${ABSEIL_DIR}/absl/status/status_payload_printer.cc", + "${ABSEIL_DIR}/absl/status/status_payload_printer.h", + "${ABSEIL_DIR}/absl/status/statusor.cc", + "${ABSEIL_DIR}/absl/status/statusor.h", + "${ABSEIL_DIR}/absl/strings/ascii.cc", + "${ABSEIL_DIR}/absl/strings/ascii.h", + "${ABSEIL_DIR}/absl/strings/charconv.cc", + "${ABSEIL_DIR}/absl/strings/charconv.h", + "${ABSEIL_DIR}/absl/strings/cord.cc", + "${ABSEIL_DIR}/absl/strings/cord.h", + "${ABSEIL_DIR}/absl/strings/cord_analysis.cc", + "${ABSEIL_DIR}/absl/strings/cord_analysis.h", + "${ABSEIL_DIR}/absl/strings/cord_buffer.cc", + "${ABSEIL_DIR}/absl/strings/cord_buffer.h", + "${ABSEIL_DIR}/absl/strings/escaping.cc", + "${ABSEIL_DIR}/absl/strings/escaping.h", + "${ABSEIL_DIR}/absl/strings/internal/char_map.h", + "${ABSEIL_DIR}/absl/strings/internal/charconv_bigint.cc", + "${ABSEIL_DIR}/absl/strings/internal/charconv_bigint.h", + "${ABSEIL_DIR}/absl/strings/internal/charconv_parse.cc", + "${ABSEIL_DIR}/absl/strings/internal/charconv_parse.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_data_edge.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_internal.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_internal.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_navigator.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_navigator.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_reader.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_btree_reader.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_consume.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_consume.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_crc.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_crc.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_flat.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring.cc", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring.h", + "${ABSEIL_DIR}/absl/strings/internal/cord_rep_ring_reader.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_functions.cc", + "${ABSEIL_DIR}/absl/strings/internal/cordz_functions.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_handle.cc", + "${ABSEIL_DIR}/absl/strings/internal/cordz_handle.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_info.cc", + "${ABSEIL_DIR}/absl/strings/internal/cordz_info.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_sample_token.cc", + "${ABSEIL_DIR}/absl/strings/internal/cordz_sample_token.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_statistics.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_update_scope.h", + "${ABSEIL_DIR}/absl/strings/internal/cordz_update_tracker.h", + "${ABSEIL_DIR}/absl/strings/internal/damerau_levenshtein_distance.cc", + "${ABSEIL_DIR}/absl/strings/internal/damerau_levenshtein_distance.h", + "${ABSEIL_DIR}/absl/strings/internal/escaping.cc", + "${ABSEIL_DIR}/absl/strings/internal/escaping.h", + "${ABSEIL_DIR}/absl/strings/internal/has_absl_stringify.h", + "${ABSEIL_DIR}/absl/strings/internal/memutil.cc", + "${ABSEIL_DIR}/absl/strings/internal/memutil.h", + "${ABSEIL_DIR}/absl/strings/internal/ostringstream.cc", + "${ABSEIL_DIR}/absl/strings/internal/ostringstream.h", + "${ABSEIL_DIR}/absl/strings/internal/pow10_helper.cc", + "${ABSEIL_DIR}/absl/strings/internal/pow10_helper.h", + "${ABSEIL_DIR}/absl/strings/internal/resize_uninitialized.h", + "${ABSEIL_DIR}/absl/strings/internal/stl_type_traits.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/arg.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/arg.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/bind.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/bind.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/checker.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/constexpr_parser.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/extension.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/extension.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/float_conversion.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/float_conversion.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/output.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/output.h", + "${ABSEIL_DIR}/absl/strings/internal/str_format/parser.cc", + "${ABSEIL_DIR}/absl/strings/internal/str_format/parser.h", + "${ABSEIL_DIR}/absl/strings/internal/str_join_internal.h", + "${ABSEIL_DIR}/absl/strings/internal/str_split_internal.h", + "${ABSEIL_DIR}/absl/strings/internal/string_constant.h", + "${ABSEIL_DIR}/absl/strings/internal/stringify_sink.cc", + "${ABSEIL_DIR}/absl/strings/internal/stringify_sink.h", + "${ABSEIL_DIR}/absl/strings/internal/utf8.cc", + "${ABSEIL_DIR}/absl/strings/internal/utf8.h", + "${ABSEIL_DIR}/absl/strings/match.cc", + "${ABSEIL_DIR}/absl/strings/match.h", + "${ABSEIL_DIR}/absl/strings/numbers.cc", + "${ABSEIL_DIR}/absl/strings/numbers.h", + "${ABSEIL_DIR}/absl/strings/str_cat.cc", + "${ABSEIL_DIR}/absl/strings/str_cat.h", + "${ABSEIL_DIR}/absl/strings/str_format.h", + "${ABSEIL_DIR}/absl/strings/str_join.h", + "${ABSEIL_DIR}/absl/strings/str_replace.cc", + "${ABSEIL_DIR}/absl/strings/str_replace.h", + "${ABSEIL_DIR}/absl/strings/str_split.cc", + "${ABSEIL_DIR}/absl/strings/str_split.h", + "${ABSEIL_DIR}/absl/strings/string_view.cc", + "${ABSEIL_DIR}/absl/strings/string_view.h", + "${ABSEIL_DIR}/absl/strings/strip.h", + "${ABSEIL_DIR}/absl/strings/substitute.cc", + "${ABSEIL_DIR}/absl/strings/substitute.h", + "${ABSEIL_DIR}/absl/synchronization/barrier.cc", + "${ABSEIL_DIR}/absl/synchronization/barrier.h", + "${ABSEIL_DIR}/absl/synchronization/blocking_counter.cc", + "${ABSEIL_DIR}/absl/synchronization/blocking_counter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/create_thread_identity.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/create_thread_identity.h", + "${ABSEIL_DIR}/absl/synchronization/internal/futex.h", + "${ABSEIL_DIR}/absl/synchronization/internal/futex_waiter.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/futex_waiter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/graphcycles.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/graphcycles.h", + "${ABSEIL_DIR}/absl/synchronization/internal/kernel_timeout.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/kernel_timeout.h", + "${ABSEIL_DIR}/absl/synchronization/internal/per_thread_sem.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/per_thread_sem.h", + "${ABSEIL_DIR}/absl/synchronization/internal/pthread_waiter.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/pthread_waiter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/sem_waiter.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/sem_waiter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/stdcpp_waiter.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/stdcpp_waiter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/thread_pool.h", + "${ABSEIL_DIR}/absl/synchronization/internal/waiter.h", + "${ABSEIL_DIR}/absl/synchronization/internal/waiter_base.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/waiter_base.h", + "${ABSEIL_DIR}/absl/synchronization/internal/win32_waiter.cc", + "${ABSEIL_DIR}/absl/synchronization/internal/win32_waiter.h", + "${ABSEIL_DIR}/absl/synchronization/mutex.cc", + "${ABSEIL_DIR}/absl/synchronization/mutex.h", + "${ABSEIL_DIR}/absl/synchronization/notification.cc", + "${ABSEIL_DIR}/absl/synchronization/notification.h", + "${ABSEIL_DIR}/absl/time/civil_time.cc", + "${ABSEIL_DIR}/absl/time/civil_time.h", + "${ABSEIL_DIR}/absl/time/clock.cc", + "${ABSEIL_DIR}/absl/time/clock.h", + "${ABSEIL_DIR}/absl/time/duration.cc", + "${ABSEIL_DIR}/absl/time/format.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/civil_time.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/civil_time_detail.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/time_zone.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/include/cctz/zone_info_source.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/civil_time_detail.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_fixed.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_fixed.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_format.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_if.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_if.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_impl.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_impl.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_info.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_info.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_libc.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_libc.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_lookup.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_posix.cc", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/time_zone_posix.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/tzfile.h", + "${ABSEIL_DIR}/absl/time/internal/cctz/src/zone_info_source.cc", + "${ABSEIL_DIR}/absl/time/time.cc", + "${ABSEIL_DIR}/absl/time/time.h", + "${ABSEIL_DIR}/absl/types/any.h", + "${ABSEIL_DIR}/absl/types/bad_any_cast.cc", + "${ABSEIL_DIR}/absl/types/bad_any_cast.h", + "${ABSEIL_DIR}/absl/types/bad_optional_access.cc", + "${ABSEIL_DIR}/absl/types/bad_optional_access.h", + "${ABSEIL_DIR}/absl/types/bad_variant_access.cc", + "${ABSEIL_DIR}/absl/types/bad_variant_access.h", + "${ABSEIL_DIR}/absl/types/compare.h", + "${ABSEIL_DIR}/absl/types/internal/conformance_aliases.h", + "${ABSEIL_DIR}/absl/types/internal/conformance_archetype.h", + "${ABSEIL_DIR}/absl/types/internal/conformance_profile.h", + "${ABSEIL_DIR}/absl/types/internal/optional.h", + "${ABSEIL_DIR}/absl/types/internal/parentheses.h", + "${ABSEIL_DIR}/absl/types/internal/span.h", + "${ABSEIL_DIR}/absl/types/internal/transform_args.h", + "${ABSEIL_DIR}/absl/types/internal/variant.h", + "${ABSEIL_DIR}/absl/types/optional.h", + "${ABSEIL_DIR}/absl/types/span.h", + "${ABSEIL_DIR}/absl/types/variant.h", + "${ABSEIL_DIR}/absl/utility/internal/if_constexpr.h", + "${ABSEIL_DIR}/absl/utility/utility.h", + ] + include_dirs = [ "${ABSEIL_DIR}/" ] + configs = [ ":cflags_config" ] + public_configs = [ ":absl_public_config" ] + deps = [] + subsystem_name = "${THIRDPARTY_ABSEIL_SUBSYS_NAME}" + part_name = "${THIRDPARTY_ABSEIL_PART_NAME}" +} diff --git a/build/third_party_gn/abseil-cpp/dummy_bundle.json b/build/third_party_gn/abseil-cpp/dummy_bundle.json new file mode 100644 index 00000000..32de0b79 --- /dev/null +++ b/build/third_party_gn/abseil-cpp/dummy_bundle.json @@ -0,0 +1,15 @@ +{ + "component": { + "build": { + "inner_kits": [ + { + "header": { + "header_base": "//third_party/abseil-cpp/abseil-cpp", + "header_files": [] + }, + "name": "//arkcompiler/toolchain/build/third_party_gn/abseil-cpp:absl_base_static" + } + ] + } + } +} \ No newline at end of file diff --git a/build/third_party_gn/protobuf/BUILD.gn b/build/third_party_gn/protobuf/BUILD.gn index 754fca10..abd3ec33 100644 --- a/build/third_party_gn/protobuf/BUILD.gn +++ b/build/third_party_gn/protobuf/BUILD.gn @@ -22,109 +22,52 @@ config("protobuf_config") { include_dirs = [ "$protobuf_src_root" ] } -ohos_shared_library("protobuf_lite") { - sources = [ - "$protobuf_src_root/google/protobuf/any_lite.cc", - "$protobuf_src_root/google/protobuf/arena.cc", - "$protobuf_src_root/google/protobuf/extension_set.cc", - "$protobuf_src_root/google/protobuf/generated_enum_util.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", - "$protobuf_src_root/google/protobuf/generated_message_util.cc", - "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", - "$protobuf_src_root/google/protobuf/io/coded_stream.cc", - "$protobuf_src_root/google/protobuf/io/io_win32.cc", - "$protobuf_src_root/google/protobuf/io/strtod.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", - "$protobuf_src_root/google/protobuf/message_lite.cc", - "$protobuf_src_root/google/protobuf/parse_context.cc", - "$protobuf_src_root/google/protobuf/repeated_field.cc", - "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", - "$protobuf_src_root/google/protobuf/stubs/common.cc", - "$protobuf_src_root/google/protobuf/stubs/int128.cc", - "$protobuf_src_root/google/protobuf/stubs/status.cc", - "$protobuf_src_root/google/protobuf/stubs/statusor.cc", - "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", - "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", - "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", - "$protobuf_src_root/google/protobuf/stubs/strutil.cc", - "$protobuf_src_root/google/protobuf/stubs/time.cc", - "$protobuf_src_root/google/protobuf/wire_format_lite.cc", - ] - if (!is_asan && !is_debug) { - version_script = "libprotobuf_lite.map" - } - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - if (!is_mingw) { - if (current_toolchain != host_toolchain) { - external_deps = [ "hilog:libhilog" ] - } - } else { - defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] - } - - cflags_cc = [ "-Wno-sign-compare" ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - ] - - public_configs = [ ":protobuf_config" ] - install_enable = true - innerapi_tags = [ "platformsdk_indirect" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" -} - ohos_static_library("protobuf_lite_static") { sources = [ "$protobuf_src_root/google/protobuf/any_lite.cc", "$protobuf_src_root/google/protobuf/arena.cc", + "$protobuf_src_root/google/protobuf/arena_align.cc", + "$protobuf_src_root/google/protobuf/arenastring.cc", + "$protobuf_src_root/google/protobuf/arenaz_sampler.cc", "$protobuf_src_root/google/protobuf/extension_set.cc", "$protobuf_src_root/google/protobuf/generated_enum_util.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", + "$protobuf_src_root/google/protobuf/generated_message_tctable_lite.cc", "$protobuf_src_root/google/protobuf/generated_message_util.cc", "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", + "$protobuf_src_root/google/protobuf/inlined_string_field.cc", "$protobuf_src_root/google/protobuf/io/coded_stream.cc", "$protobuf_src_root/google/protobuf/io/io_win32.cc", - "$protobuf_src_root/google/protobuf/io/strtod.cc", "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "$protobuf_src_root/google/protobuf/map.cc", "$protobuf_src_root/google/protobuf/message_lite.cc", "$protobuf_src_root/google/protobuf/parse_context.cc", + "$protobuf_src_root/google/protobuf/port.cc", + "$protobuf_src_root/google/protobuf/raw_ptr.cc", "$protobuf_src_root/google/protobuf/repeated_field.cc", - "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", + "$protobuf_src_root/google/protobuf/repeated_ptr_field.cc", "$protobuf_src_root/google/protobuf/stubs/common.cc", - "$protobuf_src_root/google/protobuf/stubs/int128.cc", - "$protobuf_src_root/google/protobuf/stubs/status.cc", - "$protobuf_src_root/google/protobuf/stubs/statusor.cc", - "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", - "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", - "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", - "$protobuf_src_root/google/protobuf/stubs/strutil.cc", - "$protobuf_src_root/google/protobuf/stubs/time.cc", "$protobuf_src_root/google/protobuf/wire_format_lite.cc", + "//third_party/protobuf/third_party/utf8_range/utf8_validity.cc", ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", "$protobuf_src_root/google/protobuf/**/*.inc", "$protobuf_src_root", + "//third_party/protobuf/third_party/utf8_range", ] + external_deps = [] if (!is_mingw) { if (current_toolchain != host_toolchain) { # target build, not host build defines = [ "HAVE_HILOG" ] - external_deps = [ "hilog:libhilog" ] + external_deps += [ "hilog:libhilog" ] } } else { defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] } + external_deps += [ "abseil-cpp:absl_base_static" ] cflags_cc = [ "-Wno-sign-compare", @@ -136,7 +79,7 @@ ohos_static_library("protobuf_lite_static") { "-D HAVE_PTHREAD", ] if (is_mingw) { - # ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] + # ../../third_party/protobuf/$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] cflags += [ "-Wno-macro-redefined" ] } public_configs = [ ":protobuf_config" ] @@ -144,33 +87,72 @@ ohos_static_library("protobuf_lite_static") { part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } -ohos_shared_library("protobuf") { +ohos_static_library("protobuf_static") { sources = [ "$protobuf_src_root/google/protobuf/any.cc", "$protobuf_src_root/google/protobuf/any.pb.cc", + "$protobuf_src_root/google/protobuf/any_lite.cc", "$protobuf_src_root/google/protobuf/api.pb.cc", + "$protobuf_src_root/google/protobuf/arena.cc", + "$protobuf_src_root/google/protobuf/arena_align.cc", + "$protobuf_src_root/google/protobuf/arenastring.cc", + "$protobuf_src_root/google/protobuf/arenaz_sampler.cc", "$protobuf_src_root/google/protobuf/compiler/importer.cc", "$protobuf_src_root/google/protobuf/compiler/parser.cc", + "$protobuf_src_root/google/protobuf/cpp_features.pb.cc", "$protobuf_src_root/google/protobuf/descriptor.cc", "$protobuf_src_root/google/protobuf/descriptor.pb.cc", "$protobuf_src_root/google/protobuf/descriptor_database.cc", "$protobuf_src_root/google/protobuf/duration.pb.cc", "$protobuf_src_root/google/protobuf/dynamic_message.cc", "$protobuf_src_root/google/protobuf/empty.pb.cc", + "$protobuf_src_root/google/protobuf/extension_set.cc", "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", + "$protobuf_src_root/google/protobuf/feature_resolver.cc", "$protobuf_src_root/google/protobuf/field_mask.pb.cc", + "$protobuf_src_root/google/protobuf/generated_enum_util.cc", + "$protobuf_src_root/google/protobuf/generated_message_bases.cc", "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", + "$protobuf_src_root/google/protobuf/generated_message_tctable_full.cc", + "$protobuf_src_root/google/protobuf/generated_message_tctable_gen.cc", + "$protobuf_src_root/google/protobuf/generated_message_tctable_lite.cc", + "$protobuf_src_root/google/protobuf/generated_message_util.cc", + "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", + "$protobuf_src_root/google/protobuf/inlined_string_field.cc", + "$protobuf_src_root/google/protobuf/internal_message_util.cc", + "$protobuf_src_root/google/protobuf/io/coded_stream.cc", "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", + "$protobuf_src_root/google/protobuf/io/io_win32.cc", "$protobuf_src_root/google/protobuf/io/printer.cc", + "$protobuf_src_root/google/protobuf/io/strtod.cc", "$protobuf_src_root/google/protobuf/io/tokenizer.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_sink.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "$protobuf_src_root/google/protobuf/json/internal/lexer.cc", + "$protobuf_src_root/google/protobuf/json/internal/message_path.cc", + "$protobuf_src_root/google/protobuf/json/internal/parser.cc", + "$protobuf_src_root/google/protobuf/json/internal/unparser.cc", + "$protobuf_src_root/google/protobuf/json/internal/untyped_message.cc", + "$protobuf_src_root/google/protobuf/json/internal/writer.cc", + "$protobuf_src_root/google/protobuf/json/internal/zero_copy_buffered_stream.cc", + "$protobuf_src_root/google/protobuf/json/json.cc", + "$protobuf_src_root/google/protobuf/map.cc", "$protobuf_src_root/google/protobuf/map_field.cc", "$protobuf_src_root/google/protobuf/message.cc", + "$protobuf_src_root/google/protobuf/message_lite.cc", + "$protobuf_src_root/google/protobuf/parse_context.cc", + "$protobuf_src_root/google/protobuf/port.cc", + "$protobuf_src_root/google/protobuf/raw_ptr.cc", + "$protobuf_src_root/google/protobuf/reflection_mode.cc", "$protobuf_src_root/google/protobuf/reflection_ops.cc", + "$protobuf_src_root/google/protobuf/repeated_field.cc", + "$protobuf_src_root/google/protobuf/repeated_ptr_field.cc", "$protobuf_src_root/google/protobuf/service.cc", "$protobuf_src_root/google/protobuf/source_context.pb.cc", "$protobuf_src_root/google/protobuf/struct.pb.cc", - "$protobuf_src_root/google/protobuf/stubs/substitute.cc", + "$protobuf_src_root/google/protobuf/stubs/common.cc", "$protobuf_src_root/google/protobuf/text_format.cc", "$protobuf_src_root/google/protobuf/timestamp.pb.cc", "$protobuf_src_root/google/protobuf/type.pb.cc", @@ -178,31 +160,19 @@ ohos_shared_library("protobuf") { "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", "$protobuf_src_root/google/protobuf/util/field_comparator.cc", "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", - "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", - "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", - "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", - "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", - "$protobuf_src_root/google/protobuf/util/internal/utility.cc", - "$protobuf_src_root/google/protobuf/util/json_util.cc", "$protobuf_src_root/google/protobuf/util/message_differencer.cc", "$protobuf_src_root/google/protobuf/util/time_util.cc", "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", "$protobuf_src_root/google/protobuf/wire_format.cc", + "$protobuf_src_root/google/protobuf/wire_format_lite.cc", "$protobuf_src_root/google/protobuf/wrappers.pb.cc", + "//third_party/protobuf/third_party/utf8_range/utf8_validity.cc", ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", "$protobuf_src_root/google/protobuf/**/*.inc", "$protobuf_src_root", + "//third_party/protobuf/third_party/utf8_range", ] cflags_cc = [ "-Wno-sign-compare", @@ -214,320 +184,162 @@ ohos_shared_library("protobuf") { "-Wno-deprecated-declarations", ] - deps = [ ":protobuf_lite" ] - if (!is_asan && !is_debug) { - version_script = "libprotobuf.map" + deps = [ ":protobuf_lite_static" ] + external_deps = [ "abseil-cpp:absl_base_static" ] + if (is_mingw) { + # ../../third_party/protobuf/$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] + cflags += [ "-Wno-macro-redefined" ] } public_configs = [ ":protobuf_config" ] - install_enable = true subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } -ohos_static_library("protobuf_static") { +ohos_static_library("protoc_static_lib") { sources = [ - "$protobuf_src_root/google/protobuf/any.cc", - "$protobuf_src_root/google/protobuf/any.pb.cc", - "$protobuf_src_root/google/protobuf/api.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/importer.cc", - "$protobuf_src_root/google/protobuf/compiler/parser.cc", - "$protobuf_src_root/google/protobuf/descriptor.cc", - "$protobuf_src_root/google/protobuf/descriptor.pb.cc", - "$protobuf_src_root/google/protobuf/descriptor_database.cc", - "$protobuf_src_root/google/protobuf/duration.pb.cc", - "$protobuf_src_root/google/protobuf/dynamic_message.cc", - "$protobuf_src_root/google/protobuf/empty.pb.cc", - "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", - "$protobuf_src_root/google/protobuf/field_mask.pb.cc", - "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", - "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", - "$protobuf_src_root/google/protobuf/io/printer.cc", - "$protobuf_src_root/google/protobuf/io/tokenizer.cc", - "$protobuf_src_root/google/protobuf/map_field.cc", - "$protobuf_src_root/google/protobuf/message.cc", - "$protobuf_src_root/google/protobuf/reflection_ops.cc", - "$protobuf_src_root/google/protobuf/service.cc", - "$protobuf_src_root/google/protobuf/source_context.pb.cc", - "$protobuf_src_root/google/protobuf/struct.pb.cc", - "$protobuf_src_root/google/protobuf/stubs/substitute.cc", - "$protobuf_src_root/google/protobuf/text_format.cc", - "$protobuf_src_root/google/protobuf/timestamp.pb.cc", - "$protobuf_src_root/google/protobuf/type.pb.cc", - "$protobuf_src_root/google/protobuf/unknown_field_set.cc", - "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", - "$protobuf_src_root/google/protobuf/util/field_comparator.cc", - "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", - "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", - "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", - "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", - "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", - "$protobuf_src_root/google/protobuf/util/internal/utility.cc", - "$protobuf_src_root/google/protobuf/util/json_util.cc", - "$protobuf_src_root/google/protobuf/util/message_differencer.cc", - "$protobuf_src_root/google/protobuf/util/time_util.cc", - "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", - "$protobuf_src_root/google/protobuf/wire_format.cc", - "$protobuf_src_root/google/protobuf/wrappers.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/allowlists/editions.cc", + "$protobuf_src_root/google/protobuf/compiler/allowlists/empty_package.cc", + "$protobuf_src_root/google/protobuf/compiler/allowlists/open_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/allowlists/unused_imports.cc", + "$protobuf_src_root/google/protobuf/compiler/allowlists/weak_imports.cc", + "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/enum.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/extension.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/cord_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/field_generators/string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/file.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/generator.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/message.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/padding_optimizer.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/parse_function_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/service.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/tracker.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/names.cc", + "$protobuf_src_root/google/protobuf/compiler/java/context.cc", + "$protobuf_src_root/google/protobuf/compiler/java/doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/java/enum.cc", + "$protobuf_src_root/google/protobuf/compiler/java/enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/enum_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/enum_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/extension.cc", + "$protobuf_src_root/google/protobuf/compiler/java/extension_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/file.cc", + "$protobuf_src_root/google/protobuf/compiler/java/generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/generator_factory.cc", + "$protobuf_src_root/google/protobuf/compiler/java/helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_features.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/java/kotlin_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/map_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_builder.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_builder_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/message_serialization.cc", + "$protobuf_src_root/google/protobuf/compiler/java/name_resolver.cc", + "$protobuf_src_root/google/protobuf/compiler/java/names.cc", + "$protobuf_src_root/google/protobuf/compiler/java/primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/primitive_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/service.cc", + "$protobuf_src_root/google/protobuf/compiler/java/shared_code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/string_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/enum.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/extension.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/file.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/generator.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/import_writer.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/line_consumer.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/message.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/names.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/oneof.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/text_format_decode_data.cc", + "$protobuf_src_root/google/protobuf/compiler/php/names.cc", + "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/python/generator.cc", + "$protobuf_src_root/google/protobuf/compiler/python/helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/python/pyi_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/retention.cc", + "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/accessors/accessors.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/accessors/singular_message.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/accessors/singular_scalar.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/accessors/singular_string.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/accessors/unsupported_field.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/context.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/generator.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/message.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/naming.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/oneof.cc", + "$protobuf_src_root/google/protobuf/compiler/rust/relative_path.cc", + "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", + "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", + "//third_party/protobuf/third_party/utf8_range/utf8_validity.cc", ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", "$protobuf_src_root/google/protobuf/**/*.inc", "$protobuf_src_root", + "//third_party/protobuf/third_party/utf8_range", ] cflags_cc = [ "-Wno-sign-compare", + "-Wno-unused-function", + "-Wno-unused-private-field", "-Wno-deprecated-declarations", ] cflags = [ "-Wno-sign-compare", "-D HAVE_PTHREAD", + "-Wno-unused-function", "-Wno-deprecated-declarations", ] - deps = [ ":protobuf_lite_static" ] - + deps = [ + ":protobuf_lite_static", + ":protobuf_static", + ] + external_deps = [ "abseil-cpp:absl_base_static" ] public_configs = [ ":protobuf_config" ] subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } -if (current_toolchain == host_toolchain) { - ohos_shared_library("protoc_lib") { - sources = [ - "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", - "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", - ] - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - cflags_cc = [ - "-Wno-sign-compare", - "-Wno-unused-function", - "-Wno-unused-private-field", - "-Wno-deprecated-declarations", - ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - "-Wno-unused-function", - "-Wno-deprecated-declarations", - ] - - deps = [ - ":protobuf", - ":protobuf_lite", - ] - - public_configs = [ ":protobuf_config" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" - } - - ohos_static_library("protoc_static_lib") { - sources = [ - "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", - "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", - ] - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - cflags_cc = [ - "-Wno-sign-compare", - "-Wno-unused-function", - "-Wno-unused-private-field", - "-Wno-deprecated-declarations", - ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - "-Wno-unused-function", - "-Wno-deprecated-declarations", - ] - - deps = [ - ":protobuf_lite_static", - ":protobuf_static", - ] - - public_configs = [ ":protobuf_config" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" - } -} - # Only compile the plugin for the host architecture. if (current_toolchain == host_toolchain) { ohos_executable("protoc") { @@ -542,6 +354,7 @@ if (current_toolchain == host_toolchain) { "-Wno-sign-compare", "-Wno-deprecated-declarations", ] + external_deps = [ "abseil-cpp:absl_base_static" ] cflags = [ "-Wno-sign-compare", "-D HAVE_PTHREAD", -- Gitee