| # Copyright (C) 2017 The Android Open Source Project | |
| # | |
| # 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("../gn/perfetto.gni") | |
| import("../gn/standalone/libc++/libc++.gni") | |
| import("../gn/standalone/sanitizers/vars.gni") | |
| # We should never get here in embedder builds. | |
| assert(perfetto_build_standalone || is_perfetto_build_generator) | |
| # This is to make sure that we don't add accidental dependencies from build | |
| # files in src/ or include/ to buildtools. All deps (outside of /gn/*) should | |
| # go via the groups defined in gn/BUILD.gn, not directly into buildtools. This | |
| # is to allow embedders to re-route targets to their third_party directories. | |
| _buildtools_visibility = [ | |
| "./*", | |
| "../gn:*", | |
| "../gn/standalone:*", | |
| "../src/base:flat_hash_map_benchmark", | |
| ] | |
| # Used to suppress warnings coming from googletest macros expansions. | |
| # These suppressions apply both to gtest/gmock haders and to perfetto's | |
| # test translation units. See test/gtest_and_gmock.h for the subset of | |
| # suppressions that apply only to the gmock/gtest headers. | |
| config("test_warning_suppressions") { | |
| visibility = _buildtools_visibility | |
| if (is_clang) { | |
| cflags = [ | |
| "-Wno-covered-switch-default", | |
| "-Wno-deprecated-copy-dtor", | |
| "-Wno-global-constructors", | |
| "-Wno-inconsistent-missing-override", | |
| "-Wno-language-extension-token", | |
| "-Wno-suggest-destructor-override", | |
| "-Wno-suggest-override", | |
| "-Wno-undef", | |
| "-Wno-unknown-warning-option", | |
| "-Wno-unused-member-function", | |
| "-Wno-used-but-marked-unused", | |
| "-Wno-weak-vtables", | |
| "-Wno-zero-as-null-pointer-constant", | |
| ] | |
| } else if (!is_win) { | |
| cflags = [ | |
| "-Wno-unknown-warning-option", | |
| "-Wno-deprecated-copy", | |
| "-Wno-uninitialized", | |
| ] | |
| } | |
| } | |
| config("libunwindstack_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to suppress | |
| # warnings coming from libunwindstack headers. Doing so would mask warnings | |
| # in our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("android-unwinding/libunwindstack/include", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("android-libprocinfo/include", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("android-libbase/include", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("android-core/demangle/include", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("rustc-demangle-capi", root_build_dir), | |
| ] | |
| # TODO(rsavitski): figure out how to cleanly depend on bionic's uapi headers | |
| defines = [ | |
| "NO_LIBDEXFILE_SUPPORT", | |
| "NT_RISCV_VECTOR=0x901", | |
| "ELFCOMPRESS_ZSTD=2", | |
| ] | |
| } | |
| # Config to include gtest.h in test targets. | |
| config("googletest_config") { | |
| visibility = _buildtools_visibility | |
| defines = [ "GTEST_LANG_CXX11=1" ] | |
| include_dirs = [ | |
| "googletest/googletest/include", | |
| "googletest/googlemock/include", | |
| ] | |
| configs = [ ":test_warning_suppressions" ] | |
| } | |
| source_set("gtest") { | |
| visibility = _buildtools_visibility | |
| testonly = true | |
| include_dirs = [ "googletest/googletest" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":googletest_config" ] | |
| all_dependent_configs = [ ":googletest_config" ] | |
| sources = [ "googletest/googletest/src/gtest-all.cc" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| source_set("gtest_main") { | |
| visibility = _buildtools_visibility | |
| testonly = true | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| configs += [ ":googletest_config" ] | |
| sources = [ "googletest/googletest/src/gtest_main.cc" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| source_set("gmock") { | |
| visibility = _buildtools_visibility | |
| testonly = true | |
| include_dirs = [ "googletest/googlemock" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":googletest_config" ] | |
| all_dependent_configs = [ ":googletest_config" ] | |
| sources = [ "googletest/googlemock/src/gmock-all.cc" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| # Abseil-cpp configuration and source_set. | |
| # Required by protobuf v22+. | |
| config("abseil_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "abseil-cpp" ] | |
| cflags = [] | |
| if (is_clang) { | |
| cflags += [ | |
| "-Wno-deprecated-builtins", | |
| "-Wno-deprecated-pragma", | |
| "-Wno-gcc-compat", | |
| "-Wno-nullability-extension", | |
| "-Wno-unknown-warning-option", | |
| "-Wno-redundant-parens", | |
| "-Wno-double-promotion", | |
| "-Wno-thread-safety-negative", | |
| "-Wno-used-but-marked-unused", | |
| ] | |
| } | |
| if (is_gcc) { | |
| cflags += [ | |
| "-Wno-stringop-overflow", | |
| "-Wno-ignored-attributes", | |
| "-Wno-pedantic", | |
| "-Wno-overflow", | |
| ] | |
| } | |
| } | |
| # We separate this from the above because frameworks need to be forcefully | |
| # propogated to all dependents, unlike regular link flags. | |
| config("abseil_framework_config") { | |
| # CoreFoundation is needed by abseil on macOS native builds but must not | |
| # be passed to emscripten when cross-compiling to WASM. | |
| if (is_mac && !is_wasm) { | |
| ldflags = [ | |
| "-framework", | |
| "CoreFoundation", | |
| ] | |
| } | |
| } | |
| source_set("abseil_cpp") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| # base | |
| "abseil-cpp/absl/base/attributes.h", | |
| "abseil-cpp/absl/base/call_once.h", | |
| "abseil-cpp/absl/base/casts.h", | |
| "abseil-cpp/absl/base/config.h", | |
| "abseil-cpp/absl/base/const_init.h", | |
| "abseil-cpp/absl/base/dynamic_annotations.h", | |
| "abseil-cpp/absl/base/internal/cycleclock.cc", | |
| "abseil-cpp/absl/base/internal/cycleclock.h", | |
| "abseil-cpp/absl/base/internal/low_level_alloc.cc", | |
| "abseil-cpp/absl/base/internal/low_level_alloc.h", | |
| "abseil-cpp/absl/base/internal/raw_logging.cc", | |
| "abseil-cpp/absl/base/internal/raw_logging.h", | |
| "abseil-cpp/absl/base/internal/spinlock.cc", | |
| "abseil-cpp/absl/base/internal/spinlock.h", | |
| "abseil-cpp/absl/base/internal/spinlock_wait.cc", | |
| "abseil-cpp/absl/base/internal/spinlock_wait.h", | |
| "abseil-cpp/absl/base/internal/strerror.cc", | |
| "abseil-cpp/absl/base/internal/sysinfo.cc", | |
| "abseil-cpp/absl/base/internal/sysinfo.h", | |
| "abseil-cpp/absl/base/internal/thread_identity.cc", | |
| "abseil-cpp/absl/base/internal/thread_identity.h", | |
| "abseil-cpp/absl/base/internal/throw_delegate.cc", | |
| "abseil-cpp/absl/base/internal/throw_delegate.h", | |
| "abseil-cpp/absl/base/internal/tracing.cc", | |
| "abseil-cpp/absl/base/internal/tracing.h", | |
| "abseil-cpp/absl/base/internal/unscaledcycleclock.cc", | |
| "abseil-cpp/absl/base/internal/unscaledcycleclock.h", | |
| "abseil-cpp/absl/base/log_severity.cc", | |
| "abseil-cpp/absl/base/log_severity.h", | |
| "abseil-cpp/absl/base/macros.h", | |
| "abseil-cpp/absl/base/no_destructor.h", | |
| "abseil-cpp/absl/base/nullability.h", | |
| "abseil-cpp/absl/base/optimization.h", | |
| "abseil-cpp/absl/base/options.h", | |
| "abseil-cpp/absl/base/policy_checks.h", | |
| "abseil-cpp/absl/base/port.h", | |
| "abseil-cpp/absl/base/prefetch.h", | |
| "abseil-cpp/absl/base/thread_annotations.h", | |
| # container | |
| "abseil-cpp/absl/container/btree_map.h", | |
| "abseil-cpp/absl/container/btree_set.h", | |
| "abseil-cpp/absl/container/fixed_array.h", | |
| "abseil-cpp/absl/container/flat_hash_map.h", | |
| "abseil-cpp/absl/container/flat_hash_set.h", | |
| "abseil-cpp/absl/container/inlined_vector.h", | |
| "abseil-cpp/absl/container/internal/compressed_tuple.h", | |
| "abseil-cpp/absl/container/internal/container_memory.h", | |
| "abseil-cpp/absl/container/internal/hash_function_defaults.h", | |
| "abseil-cpp/absl/container/internal/hashtablez_sampler.cc", | |
| "abseil-cpp/absl/container/internal/hashtablez_sampler.h", | |
| "abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc", | |
| "abseil-cpp/absl/container/internal/raw_hash_map.h", | |
| "abseil-cpp/absl/container/internal/raw_hash_set.cc", | |
| "abseil-cpp/absl/container/internal/raw_hash_set.h", | |
| "abseil-cpp/absl/container/node_hash_map.h", | |
| "abseil-cpp/absl/container/node_hash_set.h", | |
| # crc (needed by strings/cord) | |
| "abseil-cpp/absl/crc/crc32c.cc", | |
| "abseil-cpp/absl/crc/crc32c.h", | |
| "abseil-cpp/absl/crc/internal/cpu_detect.cc", | |
| "abseil-cpp/absl/crc/internal/crc.cc", | |
| "abseil-cpp/absl/crc/internal/crc.h", | |
| "abseil-cpp/absl/crc/internal/crc_cord_state.cc", | |
| "abseil-cpp/absl/crc/internal/crc_cord_state.h", | |
| "abseil-cpp/absl/crc/internal/crc_memcpy_fallback.cc", | |
| "abseil-cpp/absl/crc/internal/crc_memcpy_x86_arm_combined.cc", | |
| "abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc", | |
| "abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc", | |
| # debugging (needed by log) | |
| "abseil-cpp/absl/debugging/failure_signal_handler.cc", | |
| "abseil-cpp/absl/debugging/failure_signal_handler.h", | |
| "abseil-cpp/absl/debugging/internal/address_is_readable.cc", | |
| "abseil-cpp/absl/debugging/internal/address_is_readable.h", | |
| "abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc", | |
| "abseil-cpp/absl/debugging/internal/demangle.cc", | |
| "abseil-cpp/absl/debugging/internal/demangle.h", | |
| "abseil-cpp/absl/debugging/internal/demangle_rust.cc", | |
| "abseil-cpp/absl/debugging/internal/elf_mem_image.cc", | |
| "abseil-cpp/absl/debugging/internal/elf_mem_image.h", | |
| "abseil-cpp/absl/debugging/internal/examine_stack.cc", | |
| "abseil-cpp/absl/debugging/internal/examine_stack.h", | |
| "abseil-cpp/absl/debugging/internal/stack_consumption.cc", | |
| "abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc", | |
| "abseil-cpp/absl/debugging/internal/vdso_support.cc", | |
| "abseil-cpp/absl/debugging/internal/vdso_support.h", | |
| "abseil-cpp/absl/debugging/leak_check.cc", | |
| "abseil-cpp/absl/debugging/leak_check.h", | |
| "abseil-cpp/absl/debugging/stacktrace.cc", | |
| "abseil-cpp/absl/debugging/stacktrace.h", | |
| "abseil-cpp/absl/debugging/symbolize.cc", | |
| "abseil-cpp/absl/debugging/symbolize.h", | |
| # flags (needed by log) | |
| "abseil-cpp/absl/flags/commandlineflag.cc", | |
| "abseil-cpp/absl/flags/commandlineflag.h", | |
| "abseil-cpp/absl/flags/config.h", | |
| "abseil-cpp/absl/flags/declare.h", | |
| "abseil-cpp/absl/flags/flag.h", | |
| "abseil-cpp/absl/flags/internal/commandlineflag.cc", | |
| "abseil-cpp/absl/flags/internal/commandlineflag.h", | |
| "abseil-cpp/absl/flags/internal/flag.cc", | |
| "abseil-cpp/absl/flags/internal/flag.h", | |
| "abseil-cpp/absl/flags/internal/private_handle_accessor.cc", | |
| "abseil-cpp/absl/flags/internal/private_handle_accessor.h", | |
| "abseil-cpp/absl/flags/internal/program_name.cc", | |
| "abseil-cpp/absl/flags/internal/program_name.h", | |
| "abseil-cpp/absl/flags/internal/usage.cc", | |
| "abseil-cpp/absl/flags/internal/usage.h", | |
| "abseil-cpp/absl/flags/marshalling.cc", | |
| "abseil-cpp/absl/flags/marshalling.h", | |
| "abseil-cpp/absl/flags/parse.cc", | |
| "abseil-cpp/absl/flags/parse.h", | |
| "abseil-cpp/absl/flags/reflection.cc", | |
| "abseil-cpp/absl/flags/reflection.h", | |
| "abseil-cpp/absl/flags/usage.cc", | |
| "abseil-cpp/absl/flags/usage.h", | |
| "abseil-cpp/absl/flags/usage_config.cc", | |
| "abseil-cpp/absl/flags/usage_config.h", | |
| # hash | |
| "abseil-cpp/absl/hash/hash.h", | |
| "abseil-cpp/absl/hash/internal/city.cc", | |
| "abseil-cpp/absl/hash/internal/city.h", | |
| "abseil-cpp/absl/hash/internal/hash.cc", | |
| "abseil-cpp/absl/hash/internal/hash.h", | |
| "abseil-cpp/absl/hash/internal/low_level_hash.cc", | |
| "abseil-cpp/absl/hash/internal/low_level_hash.h", | |
| # log | |
| "abseil-cpp/absl/log/absl_check.h", | |
| "abseil-cpp/absl/log/absl_log.h", | |
| "abseil-cpp/absl/log/check.h", | |
| "abseil-cpp/absl/log/die_if_null.cc", | |
| "abseil-cpp/absl/log/die_if_null.h", | |
| # Note: flags.cc is excluded because it defines FLAGS_v which conflicts | |
| # with Google Benchmark's FLAGS_v. | |
| # "abseil-cpp/absl/log/flags.cc", | |
| "abseil-cpp/absl/log/globals.cc", | |
| "abseil-cpp/absl/log/globals.h", | |
| "abseil-cpp/absl/log/initialize.cc", | |
| "abseil-cpp/absl/log/initialize.h", | |
| "abseil-cpp/absl/log/internal/check_op.cc", | |
| "abseil-cpp/absl/log/internal/check_op.h", | |
| "abseil-cpp/absl/log/internal/conditions.cc", | |
| "abseil-cpp/absl/log/internal/conditions.h", | |
| "abseil-cpp/absl/log/internal/fnmatch.cc", | |
| "abseil-cpp/absl/log/internal/globals.cc", | |
| "abseil-cpp/absl/log/internal/globals.h", | |
| "abseil-cpp/absl/log/internal/log_format.cc", | |
| "abseil-cpp/absl/log/internal/log_format.h", | |
| "abseil-cpp/absl/log/internal/log_message.cc", | |
| "abseil-cpp/absl/log/internal/log_message.h", | |
| "abseil-cpp/absl/log/internal/log_sink_set.cc", | |
| "abseil-cpp/absl/log/internal/log_sink_set.h", | |
| "abseil-cpp/absl/log/internal/nullguard.cc", | |
| "abseil-cpp/absl/log/internal/nullguard.h", | |
| "abseil-cpp/absl/log/internal/proto.cc", | |
| "abseil-cpp/absl/log/internal/proto.h", | |
| "abseil-cpp/absl/log/internal/structured.h", | |
| "abseil-cpp/absl/log/internal/structured_proto.cc", | |
| "abseil-cpp/absl/log/internal/structured_proto.h", | |
| "abseil-cpp/absl/log/internal/vlog_config.cc", | |
| "abseil-cpp/absl/log/internal/vlog_config.h", | |
| "abseil-cpp/absl/log/log.h", | |
| "abseil-cpp/absl/log/log_entry.h", | |
| "abseil-cpp/absl/log/log_sink.cc", | |
| "abseil-cpp/absl/log/log_sink.h", | |
| "abseil-cpp/absl/log/log_sink_registry.h", | |
| # numeric | |
| "abseil-cpp/absl/numeric/bits.h", | |
| "abseil-cpp/absl/numeric/int128.cc", | |
| "abseil-cpp/absl/numeric/int128.h", | |
| # profiling (needed by container) | |
| "abseil-cpp/absl/profiling/internal/exponential_biased.cc", | |
| "abseil-cpp/absl/profiling/internal/exponential_biased.h", | |
| "abseil-cpp/absl/profiling/internal/periodic_sampler.cc", | |
| "abseil-cpp/absl/profiling/internal/periodic_sampler.h", | |
| # random (needed by various components) | |
| "abseil-cpp/absl/random/bernoulli_distribution.h", | |
| "abseil-cpp/absl/random/discrete_distribution.cc", | |
| "abseil-cpp/absl/random/discrete_distribution.h", | |
| "abseil-cpp/absl/random/distributions.h", | |
| "abseil-cpp/absl/random/gaussian_distribution.cc", | |
| "abseil-cpp/absl/random/gaussian_distribution.h", | |
| "abseil-cpp/absl/random/internal/entropy_pool.cc", | |
| "abseil-cpp/absl/random/internal/entropy_pool.h", | |
| "abseil-cpp/absl/random/internal/randen.cc", | |
| "abseil-cpp/absl/random/internal/randen.h", | |
| "abseil-cpp/absl/random/internal/randen_detect.cc", | |
| "abseil-cpp/absl/random/internal/randen_detect.h", | |
| "abseil-cpp/absl/random/internal/randen_hwaes.cc", | |
| "abseil-cpp/absl/random/internal/randen_hwaes.h", | |
| "abseil-cpp/absl/random/internal/randen_round_keys.cc", | |
| "abseil-cpp/absl/random/internal/randen_slow.cc", | |
| "abseil-cpp/absl/random/internal/randen_slow.h", | |
| "abseil-cpp/absl/random/internal/seed_material.cc", | |
| "abseil-cpp/absl/random/internal/seed_material.h", | |
| "abseil-cpp/absl/random/random.h", | |
| "abseil-cpp/absl/random/seed_gen_exception.cc", | |
| "abseil-cpp/absl/random/seed_sequences.cc", | |
| "abseil-cpp/absl/random/seed_sequences.h", | |
| # status | |
| "abseil-cpp/absl/status/internal/status_internal.cc", | |
| "abseil-cpp/absl/status/internal/status_internal.h", | |
| "abseil-cpp/absl/status/status.cc", | |
| "abseil-cpp/absl/status/status.h", | |
| "abseil-cpp/absl/status/status_payload_printer.cc", | |
| "abseil-cpp/absl/status/statusor.cc", | |
| "abseil-cpp/absl/status/statusor.h", | |
| # strings | |
| "abseil-cpp/absl/strings/ascii.cc", | |
| "abseil-cpp/absl/strings/ascii.h", | |
| "abseil-cpp/absl/strings/charconv.cc", | |
| "abseil-cpp/absl/strings/charconv.h", | |
| "abseil-cpp/absl/strings/cord.cc", | |
| "abseil-cpp/absl/strings/cord.h", | |
| "abseil-cpp/absl/strings/cord_analysis.cc", | |
| "abseil-cpp/absl/strings/cord_buffer.h", | |
| "abseil-cpp/absl/strings/escaping.cc", | |
| "abseil-cpp/absl/strings/escaping.h", | |
| "abseil-cpp/absl/strings/internal/charconv_bigint.cc", | |
| "abseil-cpp/absl/strings/internal/charconv_bigint.h", | |
| "abseil-cpp/absl/strings/internal/charconv_parse.cc", | |
| "abseil-cpp/absl/strings/internal/charconv_parse.h", | |
| "abseil-cpp/absl/strings/internal/cord_internal.cc", | |
| "abseil-cpp/absl/strings/internal/cord_internal.h", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree.cc", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree.h", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc", | |
| "abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h", | |
| "abseil-cpp/absl/strings/internal/cord_rep_consume.cc", | |
| "abseil-cpp/absl/strings/internal/cord_rep_crc.cc", | |
| "abseil-cpp/absl/strings/internal/cord_rep_crc.h", | |
| "abseil-cpp/absl/strings/internal/cord_rep_flat.h", | |
| "abseil-cpp/absl/strings/internal/cordz_functions.cc", | |
| "abseil-cpp/absl/strings/internal/cordz_functions.h", | |
| "abseil-cpp/absl/strings/internal/cordz_handle.cc", | |
| "abseil-cpp/absl/strings/internal/cordz_handle.h", | |
| "abseil-cpp/absl/strings/internal/cordz_info.cc", | |
| "abseil-cpp/absl/strings/internal/cordz_info.h", | |
| "abseil-cpp/absl/strings/internal/cordz_sample_token.cc", | |
| "abseil-cpp/absl/strings/internal/cordz_sample_token.h", | |
| "abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc", | |
| "abseil-cpp/absl/strings/internal/escaping.cc", | |
| "abseil-cpp/absl/strings/internal/escaping.h", | |
| "abseil-cpp/absl/strings/internal/memutil.cc", | |
| "abseil-cpp/absl/strings/internal/memutil.h", | |
| "abseil-cpp/absl/strings/internal/ostringstream.cc", | |
| "abseil-cpp/absl/strings/internal/ostringstream.h", | |
| "abseil-cpp/absl/strings/internal/resize_uninitialized.h", | |
| "abseil-cpp/absl/strings/internal/stl_type_traits.h", | |
| "abseil-cpp/absl/strings/internal/str_format/arg.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/arg.h", | |
| "abseil-cpp/absl/strings/internal/str_format/bind.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/bind.h", | |
| "abseil-cpp/absl/strings/internal/str_format/checker.h", | |
| "abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h", | |
| "abseil-cpp/absl/strings/internal/str_format/extension.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/extension.h", | |
| "abseil-cpp/absl/strings/internal/str_format/float_conversion.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/float_conversion.h", | |
| "abseil-cpp/absl/strings/internal/str_format/output.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/output.h", | |
| "abseil-cpp/absl/strings/internal/str_format/parser.cc", | |
| "abseil-cpp/absl/strings/internal/str_format/parser.h", | |
| "abseil-cpp/absl/strings/internal/str_join_internal.h", | |
| "abseil-cpp/absl/strings/internal/str_split_internal.h", | |
| "abseil-cpp/absl/strings/internal/stringify_sink.cc", | |
| "abseil-cpp/absl/strings/internal/stringify_sink.h", | |
| "abseil-cpp/absl/strings/internal/utf8.cc", | |
| "abseil-cpp/absl/strings/internal/utf8.h", | |
| "abseil-cpp/absl/strings/match.cc", | |
| "abseil-cpp/absl/strings/match.h", | |
| "abseil-cpp/absl/strings/numbers.cc", | |
| "abseil-cpp/absl/strings/numbers.h", | |
| "abseil-cpp/absl/strings/str_cat.cc", | |
| "abseil-cpp/absl/strings/str_cat.h", | |
| "abseil-cpp/absl/strings/str_format.h", | |
| "abseil-cpp/absl/strings/str_join.h", | |
| "abseil-cpp/absl/strings/str_replace.cc", | |
| "abseil-cpp/absl/strings/str_replace.h", | |
| "abseil-cpp/absl/strings/str_split.cc", | |
| "abseil-cpp/absl/strings/str_split.h", | |
| "abseil-cpp/absl/strings/string_view.cc", | |
| "abseil-cpp/absl/strings/string_view.h", | |
| "abseil-cpp/absl/strings/strip.h", | |
| "abseil-cpp/absl/strings/substitute.cc", | |
| "abseil-cpp/absl/strings/substitute.h", | |
| # synchronization | |
| "abseil-cpp/absl/synchronization/barrier.cc", | |
| "abseil-cpp/absl/synchronization/barrier.h", | |
| "abseil-cpp/absl/synchronization/blocking_counter.cc", | |
| "abseil-cpp/absl/synchronization/blocking_counter.h", | |
| "abseil-cpp/absl/synchronization/internal/create_thread_identity.cc", | |
| "abseil-cpp/absl/synchronization/internal/create_thread_identity.h", | |
| "abseil-cpp/absl/synchronization/internal/futex.h", | |
| "abseil-cpp/absl/synchronization/internal/futex_waiter.cc", | |
| "abseil-cpp/absl/synchronization/internal/graphcycles.cc", | |
| "abseil-cpp/absl/synchronization/internal/graphcycles.h", | |
| "abseil-cpp/absl/synchronization/internal/kernel_timeout.cc", | |
| "abseil-cpp/absl/synchronization/internal/kernel_timeout.h", | |
| "abseil-cpp/absl/synchronization/internal/per_thread_sem.cc", | |
| "abseil-cpp/absl/synchronization/internal/per_thread_sem.h", | |
| "abseil-cpp/absl/synchronization/internal/pthread_waiter.cc", | |
| "abseil-cpp/absl/synchronization/internal/sem_waiter.cc", | |
| "abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc", | |
| "abseil-cpp/absl/synchronization/internal/waiter.h", | |
| "abseil-cpp/absl/synchronization/internal/waiter_base.cc", | |
| "abseil-cpp/absl/synchronization/internal/win32_waiter.cc", | |
| "abseil-cpp/absl/synchronization/mutex.cc", | |
| "abseil-cpp/absl/synchronization/mutex.h", | |
| "abseil-cpp/absl/synchronization/notification.cc", | |
| "abseil-cpp/absl/synchronization/notification.h", | |
| # time | |
| "abseil-cpp/absl/time/civil_time.cc", | |
| "abseil-cpp/absl/time/civil_time.h", | |
| "abseil-cpp/absl/time/clock.cc", | |
| "abseil-cpp/absl/time/clock.h", | |
| "abseil-cpp/absl/time/duration.cc", | |
| "abseil-cpp/absl/time/format.cc", | |
| "abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h", | |
| "abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h", | |
| "abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h", | |
| "abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h", | |
| "abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc", | |
| "abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc", | |
| "abseil-cpp/absl/time/time.cc", | |
| "abseil-cpp/absl/time/time.h", | |
| # types | |
| "abseil-cpp/absl/types/compare.h", | |
| "abseil-cpp/absl/types/optional.h", | |
| "abseil-cpp/absl/types/span.h", | |
| "abseil-cpp/absl/types/variant.h", | |
| # utility | |
| "abseil-cpp/absl/utility/utility.h", | |
| # functional | |
| "abseil-cpp/absl/functional/any_invocable.h", | |
| "abseil-cpp/absl/functional/bind_front.h", | |
| "abseil-cpp/absl/functional/function_ref.h", | |
| # memory | |
| "abseil-cpp/absl/memory/memory.h", | |
| # meta | |
| "abseil-cpp/absl/meta/type_traits.h", | |
| # cleanup | |
| "abseil-cpp/absl/cleanup/cleanup.h", | |
| # algorithm | |
| "abseil-cpp/absl/algorithm/algorithm.h", | |
| "abseil-cpp/absl/algorithm/container.h", | |
| ] | |
| if (is_win) { | |
| sources += [ "abseil-cpp/absl/base/internal/spinlock_win32.inc" ] | |
| } else if (is_linux || is_android) { | |
| sources += [ "abseil-cpp/absl/base/internal/spinlock_linux.inc" ] | |
| } else { | |
| sources += [ "abseil-cpp/absl/base/internal/spinlock_posix.inc" ] | |
| } | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| configs += [ ":abseil_config" ] | |
| public_configs = [ ":abseil_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| all_dependent_configs = [ ":abseil_framework_config" ] | |
| } | |
| # Configuration for utf8_range (required by protobuf v22+). | |
| config("utf8_range_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "protobuf/third_party/utf8_range" ] | |
| } | |
| # UTF-8 validation library required by protobuf v22+. | |
| source_set("utf8_range") { | |
| visibility = _buildtools_visibility | |
| sources = [ "protobuf/third_party/utf8_range/utf8_range.c" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| configs += [ ":abseil_config" ] | |
| public_configs = [ ":utf8_range_config" ] | |
| public_deps = [ ":abseil_cpp" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| # Configuration for upb (micro protobuf, required by protobuf v31+). | |
| config("upb_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "protobuf", | |
| "protobuf/upb/reflection/stage0", # For pre-generated descriptor.upb.h | |
| "protobuf/third_party/utf8_range", # For utf8_range.h | |
| ] | |
| if (is_gcc) { | |
| cflags = [ | |
| "-Wno-stringop-overread", | |
| "-Wno-stringop-overflow", | |
| ] | |
| } | |
| defines = [ "UPB_BOOTSTRAP_STAGE=0" ] # Use stage0 minitable functions | |
| } | |
| # upb (micro protobuf) library required by protobuf v31+. | |
| source_set("upb") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| # base | |
| "protobuf/upb/base/descriptor_constants.h", | |
| "protobuf/upb/base/internal/endian.h", | |
| "protobuf/upb/base/internal/log2.h", | |
| "protobuf/upb/base/status.c", | |
| "protobuf/upb/base/status.h", | |
| "protobuf/upb/base/string_view.h", | |
| "protobuf/upb/base/upcast.h", | |
| # generated_code_support | |
| "protobuf/upb/generated_code_support.h", | |
| # hash | |
| "protobuf/upb/hash/common.c", | |
| "protobuf/upb/hash/common.h", | |
| "protobuf/upb/hash/int_table.h", | |
| "protobuf/upb/hash/str_table.h", | |
| # lex | |
| "protobuf/upb/lex/atoi.c", | |
| "protobuf/upb/lex/atoi.h", | |
| "protobuf/upb/lex/round_trip.c", | |
| "protobuf/upb/lex/round_trip.h", | |
| "protobuf/upb/lex/strtod.c", | |
| "protobuf/upb/lex/strtod.h", | |
| "protobuf/upb/lex/unicode.c", | |
| "protobuf/upb/lex/unicode.h", | |
| # mem | |
| "protobuf/upb/mem/alloc.c", | |
| "protobuf/upb/mem/alloc.h", | |
| "protobuf/upb/mem/arena.c", | |
| "protobuf/upb/mem/arena.h", | |
| "protobuf/upb/mem/internal/arena.h", | |
| # message | |
| "protobuf/upb/message/accessors.c", | |
| "protobuf/upb/message/accessors.h", | |
| "protobuf/upb/message/accessors_split64.h", | |
| "protobuf/upb/message/array.c", | |
| "protobuf/upb/message/array.h", | |
| "protobuf/upb/message/compare.c", | |
| "protobuf/upb/message/compare.h", | |
| "protobuf/upb/message/compat.c", | |
| "protobuf/upb/message/compat.h", | |
| "protobuf/upb/message/copy.c", | |
| "protobuf/upb/message/copy.h", | |
| "protobuf/upb/message/internal/accessors.h", | |
| "protobuf/upb/message/internal/array.h", | |
| "protobuf/upb/message/internal/compare_unknown.c", | |
| "protobuf/upb/message/internal/compare_unknown.h", | |
| "protobuf/upb/message/internal/extension.c", | |
| "protobuf/upb/message/internal/extension.h", | |
| "protobuf/upb/message/internal/iterator.c", | |
| "protobuf/upb/message/internal/iterator.h", | |
| "protobuf/upb/message/internal/map.h", | |
| "protobuf/upb/message/internal/map_entry.h", | |
| "protobuf/upb/message/internal/map_sorter.h", | |
| "protobuf/upb/message/internal/message.c", | |
| "protobuf/upb/message/internal/message.h", | |
| "protobuf/upb/message/internal/tagged_ptr.h", | |
| "protobuf/upb/message/internal/types.h", | |
| "protobuf/upb/message/map.c", | |
| "protobuf/upb/message/map.h", | |
| "protobuf/upb/message/map_gencode_util.h", | |
| "protobuf/upb/message/map_sorter.c", | |
| "protobuf/upb/message/merge.c", | |
| "protobuf/upb/message/merge.h", | |
| "protobuf/upb/message/message.c", | |
| "protobuf/upb/message/message.h", | |
| "protobuf/upb/message/promote.c", | |
| "protobuf/upb/message/promote.h", | |
| "protobuf/upb/message/tagged_ptr.h", | |
| "protobuf/upb/message/value.h", | |
| # mini_descriptor | |
| "protobuf/upb/mini_descriptor/build_enum.c", | |
| "protobuf/upb/mini_descriptor/build_enum.h", | |
| "protobuf/upb/mini_descriptor/decode.c", | |
| "protobuf/upb/mini_descriptor/decode.h", | |
| "protobuf/upb/mini_descriptor/internal/base92.c", | |
| "protobuf/upb/mini_descriptor/internal/base92.h", | |
| "protobuf/upb/mini_descriptor/internal/decoder.h", | |
| "protobuf/upb/mini_descriptor/internal/encode.c", | |
| "protobuf/upb/mini_descriptor/internal/encode.h", | |
| "protobuf/upb/mini_descriptor/internal/modifiers.h", | |
| "protobuf/upb/mini_descriptor/internal/wire_constants.h", | |
| "protobuf/upb/mini_descriptor/link.c", | |
| "protobuf/upb/mini_descriptor/link.h", | |
| # mini_table | |
| "protobuf/upb/mini_table/compat.c", | |
| "protobuf/upb/mini_table/compat.h", | |
| "protobuf/upb/mini_table/enum.h", | |
| "protobuf/upb/mini_table/extension.h", | |
| "protobuf/upb/mini_table/extension_registry.c", | |
| "protobuf/upb/mini_table/extension_registry.h", | |
| "protobuf/upb/mini_table/field.h", | |
| "protobuf/upb/mini_table/file.h", | |
| "protobuf/upb/mini_table/internal/enum.h", | |
| "protobuf/upb/mini_table/internal/extension.h", | |
| "protobuf/upb/mini_table/internal/field.h", | |
| "protobuf/upb/mini_table/internal/file.h", | |
| "protobuf/upb/mini_table/internal/message.c", | |
| "protobuf/upb/mini_table/internal/message.h", | |
| "protobuf/upb/mini_table/internal/size_log2.h", | |
| "protobuf/upb/mini_table/internal/sub.h", | |
| "protobuf/upb/mini_table/message.c", | |
| "protobuf/upb/mini_table/message.h", | |
| "protobuf/upb/mini_table/sub.h", | |
| # port | |
| "protobuf/upb/port/atomic.h", | |
| "protobuf/upb/port/vsnprintf_compat.h", | |
| # reflection | |
| "protobuf/upb/reflection/common.h", | |
| "protobuf/upb/reflection/def.h", | |
| "protobuf/upb/reflection/def_pool.c", | |
| "protobuf/upb/reflection/def_pool.h", | |
| "protobuf/upb/reflection/def_type.c", | |
| "protobuf/upb/reflection/def_type.h", | |
| "protobuf/upb/reflection/desc_state.c", | |
| "protobuf/upb/reflection/descriptor_bootstrap.h", | |
| "protobuf/upb/reflection/enum_def.c", | |
| "protobuf/upb/reflection/enum_def.h", | |
| "protobuf/upb/reflection/enum_reserved_range.c", | |
| "protobuf/upb/reflection/enum_reserved_range.h", | |
| "protobuf/upb/reflection/enum_value_def.c", | |
| "protobuf/upb/reflection/enum_value_def.h", | |
| "protobuf/upb/reflection/extension_range.c", | |
| "protobuf/upb/reflection/extension_range.h", | |
| "protobuf/upb/reflection/field_def.c", | |
| "protobuf/upb/reflection/field_def.h", | |
| "protobuf/upb/reflection/file_def.c", | |
| "protobuf/upb/reflection/file_def.h", | |
| "protobuf/upb/reflection/internal/def_builder.c", | |
| "protobuf/upb/reflection/internal/def_builder.h", | |
| "protobuf/upb/reflection/internal/def_pool.h", | |
| "protobuf/upb/reflection/internal/desc_state.h", | |
| "protobuf/upb/reflection/internal/enum_def.h", | |
| "protobuf/upb/reflection/internal/enum_reserved_range.h", | |
| "protobuf/upb/reflection/internal/enum_value_def.h", | |
| "protobuf/upb/reflection/internal/extension_range.h", | |
| "protobuf/upb/reflection/internal/field_def.h", | |
| "protobuf/upb/reflection/internal/file_def.h", | |
| "protobuf/upb/reflection/internal/message_def.h", | |
| "protobuf/upb/reflection/internal/message_reserved_range.h", | |
| "protobuf/upb/reflection/internal/method_def.h", | |
| "protobuf/upb/reflection/internal/oneof_def.h", | |
| "protobuf/upb/reflection/internal/service_def.h", | |
| "protobuf/upb/reflection/internal/strdup2.c", | |
| "protobuf/upb/reflection/message.c", | |
| "protobuf/upb/reflection/message_def.c", | |
| "protobuf/upb/reflection/message_def.h", | |
| "protobuf/upb/reflection/message_reserved_range.c", | |
| "protobuf/upb/reflection/message_reserved_range.h", | |
| "protobuf/upb/reflection/method_def.c", | |
| "protobuf/upb/reflection/method_def.h", | |
| "protobuf/upb/reflection/oneof_def.c", | |
| "protobuf/upb/reflection/oneof_def.h", | |
| "protobuf/upb/reflection/service_def.c", | |
| "protobuf/upb/reflection/service_def.h", | |
| "protobuf/upb/reflection/stage0/google/protobuf/descriptor.upb.c", | |
| "protobuf/upb/reflection/stage0/google/protobuf/descriptor.upb.h", | |
| # text | |
| "protobuf/upb/text/encode.c", | |
| "protobuf/upb/text/encode.h", | |
| "protobuf/upb/text/internal/encode.c", | |
| # wire | |
| "protobuf/upb/wire/byte_size.c", | |
| "protobuf/upb/wire/decode.c", | |
| "protobuf/upb/wire/decode.h", | |
| "protobuf/upb/wire/encode.c", | |
| "protobuf/upb/wire/encode.h", | |
| "protobuf/upb/wire/eps_copy_input_stream.c", | |
| "protobuf/upb/wire/eps_copy_input_stream.h", | |
| "protobuf/upb/wire/internal/decode_fast.c", | |
| "protobuf/upb/wire/reader.c", | |
| "protobuf/upb/wire/reader.h", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":upb_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| if (is_gcc) { | |
| cflags = [ "-Wno-attributes" ] | |
| } | |
| if (is_clang) { | |
| cflags = [ "-Wno-unknown-attributes" ] | |
| } | |
| } | |
| # upb_generator library (code generators for upb, used by protoc). | |
| # This depends on protobuf_full for compiler APIs and abseil for containers. | |
| source_set("upb_generator") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "protobuf/upb_generator/common.cc", | |
| "protobuf/upb_generator/common.h", | |
| "protobuf/upb_generator/common/names.cc", | |
| "protobuf/upb_generator/common/names.h", | |
| "protobuf/upb_generator/file_layout.cc", | |
| "protobuf/upb_generator/file_layout.h", | |
| "protobuf/upb_generator/minitable/fasttable.cc", | |
| "protobuf/upb_generator/minitable/fasttable.h", | |
| "protobuf/upb_generator/minitable/generator.cc", | |
| "protobuf/upb_generator/minitable/generator.h", | |
| "protobuf/upb_generator/minitable/names.cc", | |
| "protobuf/upb_generator/minitable/names.h", | |
| "protobuf/upb_generator/minitable/names_internal.cc", | |
| "protobuf/upb_generator/minitable/names_internal.h", | |
| "protobuf/upb_generator/plugin.cc", | |
| "protobuf/upb_generator/plugin.h", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| configs += [ | |
| ":protobuf_config", | |
| ":upb_config", | |
| ] | |
| # Export upb_config so dependents can include upb_generator headers. | |
| public_configs = [ ":upb_config" ] | |
| deps = [ | |
| ":abseil_cpp", | |
| ":protobuf_full", | |
| ":upb", | |
| "//gn:default_deps", | |
| ] | |
| } | |
| # Configuration used to build libprotobuf_* and the protoc compiler. | |
| config("protobuf_config") { | |
| visibility = _buildtools_visibility | |
| # Apply the lighter supressions and macro definitions from above. | |
| configs = [ "//gn:protobuf_gen_config" ] | |
| defines = [ "HAVE_PTHREAD=1" ] | |
| cflags = [] | |
| # Fixed upstream in: | |
| # https://github.com/protocolbuffers/protobuf/pull/10112 | |
| # But we don't have that yet. | |
| if (is_mac) { | |
| cflags += [ "-Wno-deprecated-declarations" ] | |
| } | |
| if (is_gcc) { | |
| cflags += [ | |
| "-Wno-stringop-overread", | |
| "-Wno-attributes", | |
| "-Wno-nonnull", | |
| ] | |
| } | |
| if (is_win) { | |
| cflags += [ "/W0" ] | |
| } | |
| } | |
| # Configuration propagated to targets depending on protobuf_full. | |
| config("protobuf_full_public_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [] | |
| if (is_clang) { | |
| cflags += [ | |
| "-Wno-switch-enum", | |
| "-Wno-covered-switch-default", | |
| ] | |
| if (is_win) { | |
| cflags += [ "-Wno-undef" ] | |
| } | |
| } | |
| } | |
| _protobuf_headers = [ | |
| "protobuf/src/google/protobuf/any.h", | |
| "protobuf/src/google/protobuf/any.pb.h", | |
| "protobuf/src/google/protobuf/api.pb.h", | |
| "protobuf/src/google/protobuf/arena.h", | |
| "protobuf/src/google/protobuf/arena_align.h", | |
| "protobuf/src/google/protobuf/arena_allocation_policy.h", | |
| "protobuf/src/google/protobuf/arena_cleanup.h", | |
| "protobuf/src/google/protobuf/arenastring.h", | |
| "protobuf/src/google/protobuf/arenaz_sampler.h", | |
| "protobuf/src/google/protobuf/compiler/importer.h", | |
| "protobuf/src/google/protobuf/compiler/parser.h", | |
| "protobuf/src/google/protobuf/descriptor.h", | |
| "protobuf/src/google/protobuf/descriptor.pb.h", | |
| "protobuf/src/google/protobuf/descriptor_database.h", | |
| "protobuf/src/google/protobuf/duration.pb.h", | |
| "protobuf/src/google/protobuf/dynamic_message.h", | |
| "protobuf/src/google/protobuf/empty.pb.h", | |
| "protobuf/src/google/protobuf/endian.h", | |
| "protobuf/src/google/protobuf/explicitly_constructed.h", | |
| "protobuf/src/google/protobuf/extension_set.h", | |
| "protobuf/src/google/protobuf/extension_set_inl.h", | |
| "protobuf/src/google/protobuf/field_access_listener.h", | |
| "protobuf/src/google/protobuf/field_mask.pb.h", | |
| "protobuf/src/google/protobuf/generated_enum_reflection.h", | |
| "protobuf/src/google/protobuf/generated_enum_util.h", | |
| "protobuf/src/google/protobuf/generated_message_bases.h", | |
| "protobuf/src/google/protobuf/generated_message_reflection.h", | |
| "protobuf/src/google/protobuf/generated_message_tctable_decl.h", | |
| "protobuf/src/google/protobuf/generated_message_tctable_gen.h", | |
| "protobuf/src/google/protobuf/generated_message_tctable_impl.h", | |
| "protobuf/src/google/protobuf/generated_message_util.h", | |
| "protobuf/src/google/protobuf/has_bits.h", | |
| "protobuf/src/google/protobuf/implicit_weak_message.h", | |
| "protobuf/src/google/protobuf/inlined_string_field.h", | |
| "protobuf/src/google/protobuf/io/coded_stream.h", | |
| "protobuf/src/google/protobuf/io/gzip_stream.h", | |
| "protobuf/src/google/protobuf/io/io_win32.h", | |
| "protobuf/src/google/protobuf/io/printer.h", | |
| "protobuf/src/google/protobuf/io/strtod.h", | |
| "protobuf/src/google/protobuf/io/tokenizer.h", | |
| "protobuf/src/google/protobuf/io/zero_copy_sink.h", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream.h", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream_impl.h", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h", | |
| "protobuf/src/google/protobuf/json/json.h", | |
| "protobuf/src/google/protobuf/map.h", | |
| "protobuf/src/google/protobuf/map_entry.h", | |
| "protobuf/src/google/protobuf/map_field.h", | |
| "protobuf/src/google/protobuf/map_field_lite.h", | |
| "protobuf/src/google/protobuf/map_type_handler.h", | |
| "protobuf/src/google/protobuf/message.h", | |
| "protobuf/src/google/protobuf/message_lite.h", | |
| "protobuf/src/google/protobuf/metadata.h", | |
| "protobuf/src/google/protobuf/metadata_lite.h", | |
| "protobuf/src/google/protobuf/parse_context.h", | |
| "protobuf/src/google/protobuf/port.h", | |
| "protobuf/src/google/protobuf/reflection.h", | |
| "protobuf/src/google/protobuf/reflection_internal.h", | |
| "protobuf/src/google/protobuf/reflection_ops.h", | |
| "protobuf/src/google/protobuf/repeated_field.h", | |
| "protobuf/src/google/protobuf/repeated_ptr_field.h", | |
| "protobuf/src/google/protobuf/serial_arena.h", | |
| "protobuf/src/google/protobuf/service.h", | |
| "protobuf/src/google/protobuf/source_context.pb.h", | |
| "protobuf/src/google/protobuf/string_block.h", | |
| "protobuf/src/google/protobuf/struct.pb.h", | |
| "protobuf/src/google/protobuf/stubs/callback.h", | |
| "protobuf/src/google/protobuf/stubs/common.h", | |
| "protobuf/src/google/protobuf/stubs/platform_macros.h", | |
| "protobuf/src/google/protobuf/stubs/port.h", | |
| "protobuf/src/google/protobuf/stubs/status_macros.h", | |
| "protobuf/src/google/protobuf/text_format.h", | |
| "protobuf/src/google/protobuf/thread_safe_arena.h", | |
| "protobuf/src/google/protobuf/timestamp.pb.h", | |
| "protobuf/src/google/protobuf/type.pb.h", | |
| "protobuf/src/google/protobuf/unknown_field_set.h", | |
| "protobuf/src/google/protobuf/util/delimited_message_util.h", | |
| "protobuf/src/google/protobuf/util/field_comparator.h", | |
| "protobuf/src/google/protobuf/util/field_mask_util.h", | |
| "protobuf/src/google/protobuf/util/json_util.h", | |
| "protobuf/src/google/protobuf/util/message_differencer.h", | |
| "protobuf/src/google/protobuf/util/time_util.h", | |
| "protobuf/src/google/protobuf/util/type_resolver.h", | |
| "protobuf/src/google/protobuf/util/type_resolver_util.h", | |
| "protobuf/src/google/protobuf/wire_format.h", | |
| "protobuf/src/google/protobuf/wire_format_lite.h", | |
| "protobuf/src/google/protobuf/wrappers.pb.h", | |
| ] | |
| source_set("protobuf_lite") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "protobuf/src/google/protobuf/any_lite.cc", | |
| "protobuf/src/google/protobuf/arena.cc", | |
| "protobuf/src/google/protobuf/arena_align.cc", | |
| "protobuf/src/google/protobuf/arenastring.cc", | |
| "protobuf/src/google/protobuf/arenaz_sampler.cc", | |
| "protobuf/src/google/protobuf/extension_set.cc", | |
| "protobuf/src/google/protobuf/generated_enum_util.cc", | |
| "protobuf/src/google/protobuf/generated_message_tctable_lite.cc", | |
| "protobuf/src/google/protobuf/generated_message_util.cc", | |
| "protobuf/src/google/protobuf/implicit_weak_message.cc", | |
| "protobuf/src/google/protobuf/inlined_string_field.cc", | |
| "protobuf/src/google/protobuf/io/coded_stream.cc", | |
| "protobuf/src/google/protobuf/io/io_win32.cc", | |
| "protobuf/src/google/protobuf/io/strtod.cc", | |
| "protobuf/src/google/protobuf/io/zero_copy_sink.cc", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream.cc", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc", | |
| "protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", | |
| "protobuf/src/google/protobuf/map.cc", | |
| "protobuf/src/google/protobuf/message_lite.cc", | |
| "protobuf/src/google/protobuf/micro_string.cc", | |
| "protobuf/src/google/protobuf/parse_context.cc", | |
| "protobuf/src/google/protobuf/port.cc", | |
| "protobuf/src/google/protobuf/raw_ptr.cc", | |
| "protobuf/src/google/protobuf/repeated_field.cc", | |
| "protobuf/src/google/protobuf/repeated_ptr_field.cc", | |
| "protobuf/src/google/protobuf/stubs/common.cc", | |
| "protobuf/src/google/protobuf/wire_format_lite.cc", | |
| ] | |
| sources += _protobuf_headers | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| if (is_win) { | |
| # Protobuf has its own #define WIN32_LEAN_AND_MEAN. | |
| configs -= [ "//gn/standalone:win32_lean_and_mean" ] | |
| # For CommandLineToArgvW required by protobuf's main. | |
| libs = [ "shell32.lib" ] | |
| } | |
| configs += [ ":protobuf_config" ] | |
| public_configs = [ "//gn:protobuf_gen_config" ] | |
| public_deps = [ | |
| ":abseil_cpp", | |
| ":utf8_range", | |
| ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| source_set("protobuf_full") { | |
| visibility = _buildtools_visibility | |
| public_deps = [ ":protobuf_lite" ] | |
| deps = [ "//gn:default_deps" ] | |
| sources = [ | |
| "protobuf/src/google/protobuf/any.cc", | |
| "protobuf/src/google/protobuf/any.pb.cc", | |
| "protobuf/src/google/protobuf/api.pb.cc", | |
| "protobuf/src/google/protobuf/compiler/importer.cc", | |
| "protobuf/src/google/protobuf/compiler/parser.cc", | |
| "protobuf/src/google/protobuf/cpp_features.pb.cc", | |
| "protobuf/src/google/protobuf/descriptor.cc", | |
| "protobuf/src/google/protobuf/descriptor.pb.cc", | |
| "protobuf/src/google/protobuf/descriptor_database.cc", | |
| "protobuf/src/google/protobuf/duration.pb.cc", | |
| "protobuf/src/google/protobuf/dynamic_message.cc", | |
| "protobuf/src/google/protobuf/empty.pb.cc", | |
| "protobuf/src/google/protobuf/extension_set_heavy.cc", | |
| "protobuf/src/google/protobuf/feature_resolver.cc", | |
| "protobuf/src/google/protobuf/field_mask.pb.cc", | |
| "protobuf/src/google/protobuf/generated_message_bases.cc", | |
| "protobuf/src/google/protobuf/generated_message_reflection.cc", | |
| "protobuf/src/google/protobuf/generated_message_tctable_full.cc", | |
| "protobuf/src/google/protobuf/generated_message_tctable_gen.cc", | |
| "protobuf/src/google/protobuf/internal_feature_helper.cc", | |
| "protobuf/src/google/protobuf/io/gzip_stream.cc", | |
| "protobuf/src/google/protobuf/io/printer.cc", | |
| "protobuf/src/google/protobuf/io/tokenizer.cc", | |
| "protobuf/src/google/protobuf/json/internal/lexer.cc", | |
| "protobuf/src/google/protobuf/json/internal/message_path.cc", | |
| "protobuf/src/google/protobuf/json/internal/parser.cc", | |
| "protobuf/src/google/protobuf/json/internal/unparser.cc", | |
| "protobuf/src/google/protobuf/json/internal/untyped_message.cc", | |
| "protobuf/src/google/protobuf/json/internal/writer.cc", | |
| "protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.cc", | |
| "protobuf/src/google/protobuf/json/json.cc", | |
| "protobuf/src/google/protobuf/map_field.cc", | |
| "protobuf/src/google/protobuf/message.cc", | |
| "protobuf/src/google/protobuf/reflection_mode.cc", | |
| "protobuf/src/google/protobuf/reflection_ops.cc", | |
| "protobuf/src/google/protobuf/service.cc", | |
| "protobuf/src/google/protobuf/source_context.pb.cc", | |
| "protobuf/src/google/protobuf/struct.pb.cc", | |
| "protobuf/src/google/protobuf/text_format.cc", | |
| "protobuf/src/google/protobuf/timestamp.pb.cc", | |
| "protobuf/src/google/protobuf/type.pb.cc", | |
| "protobuf/src/google/protobuf/unknown_field_set.cc", | |
| "protobuf/src/google/protobuf/util/delimited_message_util.cc", | |
| "protobuf/src/google/protobuf/util/field_comparator.cc", | |
| "protobuf/src/google/protobuf/util/field_mask_util.cc", | |
| "protobuf/src/google/protobuf/util/message_differencer.cc", | |
| "protobuf/src/google/protobuf/util/time_util.cc", | |
| "protobuf/src/google/protobuf/util/type_resolver_util.cc", | |
| "protobuf/src/google/protobuf/wire_format.cc", | |
| "protobuf/src/google/protobuf/wrappers.pb.cc", | |
| ] | |
| sources += _protobuf_headers | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| if (is_win) { | |
| # Protobuf has its own #define WIN32_LEAN_AND_MEAN. | |
| configs -= [ "//gn/standalone:win32_lean_and_mean" ] | |
| } | |
| configs += [ ":protobuf_config" ] | |
| public_configs = [ | |
| "//gn:protobuf_gen_config", | |
| ":protobuf_full_public_config", | |
| ] | |
| } | |
| source_set("protoc_lib") { | |
| visibility = _buildtools_visibility | |
| public_deps = [ | |
| ":protobuf_full", | |
| ":upb_generator", | |
| ] | |
| deps = [ "//gn:default_deps" ] | |
| sources = [ | |
| "protobuf/src/google/protobuf/compiler/code_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/code_generator_lite.cc", | |
| "protobuf/src/google/protobuf/compiler/command_line_interface.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/enum.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/extension.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_chunk.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/cord_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/map_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/string_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/field_generators/string_view_field.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/file.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/ifndef_guard.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/message.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/message_layout_helper.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/namespace_printer.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/parse_function_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/service.cc", | |
| "protobuf/src/google/protobuf/compiler/cpp/tracker.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_enum.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_field_base.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_map_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_message.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", | |
| "protobuf/src/google/protobuf/compiler/csharp/names.cc", | |
| "protobuf/src/google/protobuf/compiler/java/context.cc", | |
| "protobuf/src/google/protobuf/compiler/java/doc_comment.cc", | |
| "protobuf/src/google/protobuf/compiler/java/field_common.cc", | |
| "protobuf/src/google/protobuf/compiler/java/file.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/enum.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/extension.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/generator_factory.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/make_field_gens.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/map_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/message.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/message_builder.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/service.cc", | |
| "protobuf/src/google/protobuf/compiler/java/full/string_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/java/helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/java/internal_helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/java/java_features.pb.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/enum.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/extension.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/generator_factory.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/make_field_gens.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/map_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/message.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/message_builder.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/lite/string_field.cc", | |
| "protobuf/src/google/protobuf/compiler/java/message_serialization.cc", | |
| "protobuf/src/google/protobuf/compiler/java/name_resolver.cc", | |
| "protobuf/src/google/protobuf/compiler/java/names.cc", | |
| "protobuf/src/google/protobuf/compiler/java/shared_code_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/kotlin/field.cc", | |
| "protobuf/src/google/protobuf/compiler/kotlin/file.cc", | |
| "protobuf/src/google/protobuf/compiler/kotlin/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/kotlin/message.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/enum.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/enum_field.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/extension.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/field.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/file.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/import_writer.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/line_consumer.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/map_field.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/message.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/message_field.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/names.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/oneof.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/primitive_field.cc", | |
| "protobuf/src/google/protobuf/compiler/objectivec/tf_decode_data.cc", | |
| "protobuf/src/google/protobuf/compiler/php/names.cc", | |
| "protobuf/src/google/protobuf/compiler/php/php_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/plugin.cc", | |
| "protobuf/src/google/protobuf/compiler/plugin.pb.cc", | |
| "protobuf/src/google/protobuf/compiler/python/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/python/helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/python/pyi_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/retention.cc", | |
| "protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/accessor_case.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/accessors.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/default_value.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/map.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/repeated_field.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/singular_cord.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/singular_message.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/singular_scalar.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/singular_string.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/unsupported_field.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/accessors/with_presence.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/context.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/crate_mapping.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/enum.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/generator.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/message.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/naming.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/oneof.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/relative_path.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/rust_field_type.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/rust_keywords.cc", | |
| "protobuf/src/google/protobuf/compiler/rust/upb_helpers.cc", | |
| "protobuf/src/google/protobuf/compiler/subprocess.cc", | |
| "protobuf/src/google/protobuf/compiler/versions.cc", | |
| "protobuf/src/google/protobuf/compiler/zip_writer.cc", | |
| "protobuf/src/google/protobuf/testing/file.cc", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| if (is_win) { | |
| # Protobuf does has its own #define WIN32_LEAN_AND_MEAN. | |
| configs -= [ "//gn/standalone:win32_lean_and_mean" ] | |
| } | |
| configs += [ ":protobuf_config" ] | |
| public_configs = [ | |
| "//gn:protobuf_gen_config", | |
| ":protobuf_full_public_config", | |
| ] | |
| } | |
| if (current_toolchain == host_toolchain) { | |
| executable("protoc") { | |
| visibility = _buildtools_visibility | |
| deps = [ | |
| ":protoc_lib", | |
| "//gn:default_deps", | |
| ] | |
| sources = [ "protobuf/src/google/protobuf/compiler/main.cc" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| if (is_win) { | |
| # Protobuf does has its own #define WIN32_LEAN_AND_MEAN. | |
| configs -= [ "//gn/standalone:win32_lean_and_mean" ] | |
| } | |
| } | |
| } # host_toolchain | |
| if (use_custom_libcxx) { | |
| config("libunwind_config") { | |
| defines = [ "_LIBUNWIND_IS_NATIVE_ONLY" ] | |
| cflags = [ | |
| "-fstrict-aliasing", | |
| "-fPIC", | |
| # ValueAsBitPattern in Unwind-EHABI.cpp is only used on Debug builds. | |
| "-Wno-unused-function", | |
| # libunwind expects to be compiled with unwind tables so it can | |
| # unwind its own frames. | |
| "-funwind-tables", | |
| ] | |
| } | |
| source_set("libunwind") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| # C++ sources | |
| "libunwind/src/Unwind-EHABI.cpp", | |
| "libunwind/src/libunwind.cpp", | |
| # C sources | |
| "libunwind/src/Unwind-sjlj.c", | |
| "libunwind/src/UnwindLevel1-gcc-ext.c", | |
| "libunwind/src/UnwindLevel1.c", | |
| # ASM sources | |
| "libunwind/src/UnwindRegistersRestore.S", | |
| "libunwind/src/UnwindRegistersSave.S", | |
| ] | |
| include_dirs = [ | |
| "libunwind/include", | |
| "libunwind/src", | |
| ] | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone:no_exceptions", | |
| "//gn/standalone:rtti_cflags", | |
| # When building with msan, libunwind itself triggers memory violations | |
| # that causes msan to get stuck into an infinite loop. Just don't | |
| # instrument libunwind itself. | |
| "//gn/standalone/sanitizers:sanitizers_cflags", | |
| ] | |
| configs += [ | |
| "//gn/standalone/sanitizers:sanitizer_options_link_helper", | |
| ":libunwind_config", | |
| ] | |
| } | |
| # Config applied to both libc++ and libc++abi targets below. | |
| config("libc++config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ "-fstrict-aliasing" ] | |
| if (is_win) { | |
| cflags += [ | |
| # libc++ wants to redefine the macros WIN32_LEAN_AND_MEAN and | |
| # _CRT_RAND_S in its implementation. | |
| "-Wno-macro-redefined", | |
| ] | |
| } else { | |
| cflags += [ "-fPIC" ] | |
| } | |
| configs = [ "//gn/standalone:c++20" ] | |
| defines = [ "_LIBCPP_BUILDING_LIBRARY" ] | |
| } | |
| source_set("libc++abi") { | |
| visibility = _buildtools_visibility | |
| # Fuchsia builds don't link against any libraries that provide stack | |
| # unwinding symbols, unlike Linux does with glibc (same applies for | |
| # Android). Build and link against libunwind manually to get this | |
| # functionality. | |
| if (is_fuchsia || is_android) { | |
| deps = [ ":libunwind" ] | |
| } | |
| sources = [ | |
| "libcxxabi/src/abort_message.cpp", | |
| "libcxxabi/src/cxa_aux_runtime.cpp", | |
| "libcxxabi/src/cxa_default_handlers.cpp", | |
| "libcxxabi/src/cxa_exception.cpp", | |
| "libcxxabi/src/cxa_exception_storage.cpp", | |
| "libcxxabi/src/cxa_handlers.cpp", | |
| # This file is supposed to be used in fno-exception builds of | |
| # libc++abi. We build lib++/libc++abi with exceptions enabled. | |
| #"trunk/src/cxa_noexception.cpp", | |
| "libcxxabi/src/cxa_personality.cpp", | |
| "libcxxabi/src/cxa_vector.cpp", | |
| "libcxxabi/src/cxa_virtual.cpp", | |
| "libcxxabi/src/fallback_malloc.cpp", | |
| "libcxxabi/src/private_typeinfo.cpp", | |
| "libcxxabi/src/stdlib_exception.cpp", | |
| "libcxxabi/src/stdlib_stdexcept.cpp", | |
| "libcxxabi/src/stdlib_typeinfo.cpp", | |
| ] | |
| if (!is_tsan) { | |
| sources += [ "libcxxabi/src/cxa_guard.cpp" ] | |
| } | |
| # See the comment in cxa_demangle_stub.cc for why we don't use LLVM's | |
| # demangler on android. | |
| sources += [ "libcxxabi/src/cxa_demangle.cpp" ] | |
| if (is_fuchsia || is_android || is_linux) { | |
| sources += [ "libcxxabi/src/cxa_thread_atexit.cpp" ] | |
| } | |
| defines = [ | |
| "LIBCXXABI_SILENT_TERMINATE", | |
| # TODO(crbug.com/1298070) _LIBCPP_CONSTINIT is defined in a libc++ | |
| # revision more recent than the one currently used in Perfetto/Chrome. | |
| "_LIBCPP_CONSTINIT=constinit", | |
| ] | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone:no_exceptions", | |
| "//gn/standalone:rtti_cflags", | |
| "//gn/standalone:cxx_standard", | |
| ] | |
| configs += [ | |
| ":libc++config", | |
| "//gn/standalone/sanitizers:sanitizer_options_link_helper", | |
| ] | |
| if (!custom_libcxx_is_static) { | |
| configs -= [ "//gn/standalone:visibility_hidden" ] | |
| } | |
| # libc++abi depends on libc++ internals. | |
| include_dirs = [ "libcxx/src" ] | |
| } | |
| # Explicitly set version macros to Windows 7 to prevent libc++ from adding a | |
| # hard dependency on GetSystemTimePreciseAsFileTime, which was introduced in | |
| # Windows 8. | |
| config("libc++winver") { | |
| defines = [ | |
| "NTDDI_VERSION=NTDDI_WIN7", | |
| "_WIN32_WINNT=_WIN32_WINNT_WIN7", | |
| "WINVER=_WIN32_WINNT_WIN7", | |
| ] | |
| } | |
| if (custom_libcxx_is_static) { | |
| libcxx_target_type = "source_set" | |
| } else { | |
| libcxx_target_type = "shared_library" | |
| } | |
| target(libcxx_target_type, "libc++") { | |
| visibility = _buildtools_visibility | |
| visibility += [ "../gn/standalone/libc++:*" ] | |
| if (is_linux && !is_clang) { | |
| libs = [ "atomic" ] | |
| } | |
| inputs = [ | |
| "libcxx_config/__assertion_handler", | |
| "libcxx_config/__config_site", | |
| ] | |
| sources = [ | |
| "libcxx/src/algorithm.cpp", | |
| "libcxx/src/any.cpp", | |
| "libcxx/src/atomic.cpp", | |
| "libcxx/src/barrier.cpp", | |
| "libcxx/src/bind.cpp", | |
| "libcxx/src/call_once.cpp", | |
| "libcxx/src/charconv.cpp", | |
| "libcxx/src/chrono.cpp", | |
| "libcxx/src/condition_variable.cpp", | |
| "libcxx/src/condition_variable_destructor.cpp", | |
| "libcxx/src/error_category.cpp", | |
| "libcxx/src/exception.cpp", | |
| "libcxx/src/filesystem/directory_iterator.cpp", | |
| "libcxx/src/filesystem/filesystem_error.cpp", | |
| "libcxx/src/filesystem/operations.cpp", | |
| "libcxx/src/filesystem/path.cpp", | |
| "libcxx/src/functional.cpp", | |
| "libcxx/src/future.cpp", | |
| "libcxx/src/hash.cpp", | |
| "libcxx/src/ios.cpp", | |
| "libcxx/src/ios.instantiations.cpp", | |
| "libcxx/src/iostream.cpp", | |
| "libcxx/src/legacy_pointer_safety.cpp", | |
| "libcxx/src/locale.cpp", | |
| "libcxx/src/memory.cpp", | |
| "libcxx/src/mutex.cpp", | |
| "libcxx/src/mutex_destructor.cpp", | |
| "libcxx/src/new_handler.cpp", | |
| "libcxx/src/new_helpers.cpp", | |
| "libcxx/src/optional.cpp", | |
| "libcxx/src/random.cpp", | |
| "libcxx/src/random_shuffle.cpp", | |
| "libcxx/src/regex.cpp", | |
| "libcxx/src/ryu/d2fixed.cpp", | |
| "libcxx/src/ryu/d2s.cpp", | |
| "libcxx/src/ryu/f2s.cpp", | |
| "libcxx/src/shared_mutex.cpp", | |
| "libcxx/src/stdexcept.cpp", | |
| "libcxx/src/string.cpp", | |
| "libcxx/src/strstream.cpp", | |
| "libcxx/src/system_error.cpp", | |
| "libcxx/src/thread.cpp", | |
| "libcxx/src/typeinfo.cpp", | |
| "libcxx/src/valarray.cpp", | |
| "libcxx/src/variant.cpp", | |
| "libcxx/src/vector.cpp", | |
| "libcxx/src/verbose_abort.cpp", | |
| ] | |
| if (!using_sanitizer || is_ubsan) { | |
| # In {a,t,m}san configurations, operator new and operator delete will be | |
| # provided by the sanitizer runtime library. Since libc++ defines these | |
| # symbols with weak linkage, and the *san runtime uses strong linkage, it | |
| # should technically be OK to include this file, but it's removed to be | |
| # explicit. | |
| # We need using_sanitizer rather than is_asan || is_msan ... because in | |
| # perfetto, when cross-compiling, we build only targets with sanitizers, | |
| # but not host artifacts, and using_sanitizer is only true for the | |
| # target toolchain, while is_asan is globally true on all toolchains. | |
| # However, ubsan standalone does not provide operator new/delete, so we | |
| # need to include new.cpp for ubsan builds. | |
| sources += [ "libcxx/src/new.cpp" ] | |
| } | |
| include_dirs = [ "libcxx/src" ] | |
| if (is_win) { | |
| sources += [ | |
| "libcxx/src/support/win32/locale_win32.cpp", | |
| "libcxx/src/support/win32/support.cpp", | |
| "libcxx/src/support/win32/thread_win32.cpp", | |
| ] | |
| configs += [ ":libc++winver" ] | |
| } | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone:no_exceptions", | |
| "//gn/standalone:rtti_cflags", | |
| "//gn/standalone:cxx_standard", | |
| ] | |
| if ((is_android || is_mac) && !custom_libcxx_is_static) { | |
| # Use libc++_perfetto to avoid conflicting with system libc++ | |
| output_name = "libc++_perfettto" | |
| } | |
| configs += [ | |
| ":libc++config", | |
| "//gn/standalone/sanitizers:sanitizer_options_link_helper", | |
| ] | |
| if (!custom_libcxx_is_static) { | |
| configs -= [ "//gn/standalone:visibility_hidden" ] | |
| } | |
| defines = [] | |
| if (custom_libcxx_is_static) { | |
| if (is_mac && is_clang) { | |
| # We want operator new/delete to be private on Mac, but these functions | |
| # are implicitly created by the compiler for each translation unit, as | |
| # specified in the C++ spec 3.7.4p2, which makes them always have | |
| # default visibility. This option is needed to force hidden visibility | |
| # since -fvisibility=hidden doesn't have the desired effect. | |
| cflags = [ "-fvisibility-global-new-delete-hidden" ] | |
| } else { | |
| defines += [ | |
| # This resets the visibility to default only for the various | |
| # flavors of operator new and operator delete. These symbols | |
| # are weak and get overriden by Chromium-provided ones, but if | |
| # these symbols had hidden visibility, this would make the | |
| # Chromium symbols hidden too because elf visibility rules | |
| # require that linkers use the least visible form when merging, | |
| # and if this is hidden, then when we merge it with tcmalloc's | |
| # operator new, hidden visibility would win. However, tcmalloc | |
| # needs a visible operator new to also override operator new | |
| # references from system libraries. | |
| # TODO(lld): Ask lld for a --force-public-visibility flag or | |
| # similar to that overrides the default elf merging rules, and | |
| # make tcmalloc's gn config pass that to all its dependencies, | |
| # then remove this override here. | |
| "_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))", | |
| ] | |
| } | |
| } | |
| if (!is_mac && using_sanitizer && (is_asan || is_tsan || is_msan)) { | |
| # In {a,t,m}san configurations, operator new and operator delete will be | |
| # provided by the sanitizer runtime library. Since libc++ defines these | |
| # symbols with weak linkage, and the *san runtime uses strong linkage, it | |
| # should technically be OK to omit this, but it's added to be explicit. | |
| defines += [ "_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS" ] | |
| } | |
| if (!is_win) { | |
| defines += [ "LIBCXX_BUILDING_LIBCXXABI" ] | |
| deps = [ ":libc++abi" ] | |
| } | |
| } | |
| } # if (use_custom_libcxx) | |
| config("benchmark_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "benchmark/include" ] | |
| configs = [ ":test_warning_suppressions" ] | |
| } | |
| source_set("benchmark") { | |
| visibility = _buildtools_visibility | |
| testonly = true | |
| sources = [ | |
| "benchmark/include/benchmark/benchmark.h", | |
| "benchmark/src/arraysize.h", | |
| "benchmark/src/benchmark.cc", | |
| "benchmark/src/benchmark_api_internal.cc", | |
| "benchmark/src/benchmark_api_internal.h", | |
| "benchmark/src/benchmark_name.cc", | |
| "benchmark/src/benchmark_register.cc", | |
| "benchmark/src/benchmark_register.h", | |
| "benchmark/src/benchmark_runner.cc", | |
| "benchmark/src/benchmark_runner.h", | |
| "benchmark/src/check.h", | |
| "benchmark/src/colorprint.cc", | |
| "benchmark/src/colorprint.h", | |
| "benchmark/src/commandlineflags.cc", | |
| "benchmark/src/commandlineflags.h", | |
| "benchmark/src/complexity.cc", | |
| "benchmark/src/complexity.h", | |
| "benchmark/src/console_reporter.cc", | |
| "benchmark/src/counter.cc", | |
| "benchmark/src/counter.h", | |
| "benchmark/src/csv_reporter.cc", | |
| "benchmark/src/cycleclock.h", | |
| "benchmark/src/internal_macros.h", | |
| "benchmark/src/json_reporter.cc", | |
| "benchmark/src/log.h", | |
| "benchmark/src/mutex.h", | |
| "benchmark/src/perf_counters.cc", | |
| "benchmark/src/perf_counters.h", | |
| "benchmark/src/re.h", | |
| "benchmark/src/reporter.cc", | |
| "benchmark/src/sleep.cc", | |
| "benchmark/src/sleep.h", | |
| "benchmark/src/statistics.cc", | |
| "benchmark/src/statistics.h", | |
| "benchmark/src/string_util.cc", | |
| "benchmark/src/string_util.h", | |
| "benchmark/src/sysinfo.cc", | |
| "benchmark/src/thread_manager.h", | |
| "benchmark/src/thread_timer.h", | |
| "benchmark/src/timers.cc", | |
| "benchmark/src/timers.h", | |
| ] | |
| defines = [ "HAVE_POSIX_REGEX" ] | |
| public_configs = [ ":benchmark_config" ] | |
| all_dependent_configs = [ ":benchmark_config" ] | |
| if (!is_win) { | |
| cflags = [ "-Wno-deprecated-declarations" ] | |
| } | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| # On Linux/Android use libbacktrace in debug builds for better stacktraces. | |
| if (is_linux || is_android) { | |
| config("libbacktrace_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "libbacktrace_config", | |
| "libbacktrace", | |
| ] | |
| cflags = [ | |
| # We force include this config file because "config.h" is too generic as a | |
| # file name and on some platforms #include "config.h" ends up colliding | |
| # importing some other project's config.h. | |
| "-include", | |
| rebase_path("libbacktrace_config/config.h", root_build_dir), | |
| ] | |
| } | |
| source_set("libbacktrace") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "libbacktrace/dwarf.c", | |
| "libbacktrace/elf.c", | |
| "libbacktrace/fileline.c", | |
| "libbacktrace/mmap.c", | |
| "libbacktrace/mmapio.c", | |
| "libbacktrace/posix.c", | |
| "libbacktrace/sort.c", | |
| "libbacktrace/state.c", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":libbacktrace_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| } | |
| config("sqlite_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "sqlite" ] | |
| cflags = [ | |
| "-DSQLITE_THREADSAFE=0", | |
| "-DSQLITE_DEFAULT_MEMSTATUS=0", | |
| "-DSQLITE_LIKE_DOESNT_MATCH_BLOBS", | |
| "-DSQLITE_OMIT_DEPRECATED", | |
| "-DSQLITE_OMIT_SHARED_CACHE", | |
| "-DHAVE_USLEEP", | |
| "-DHAVE_UTIME", | |
| "-DSQLITE_BYTEORDER=1234", | |
| "-DSQLITE_DEFAULT_AUTOVACUUM=0", | |
| "-DSQLITE_DEFAULT_MMAP_SIZE=0", | |
| "-DSQLITE_CORE", | |
| "-DSQLITE_TEMP_STORE=3", | |
| "-DSQLITE_OMIT_LOAD_EXTENSION", | |
| "-DSQLITE_OMIT_RANDOMNESS", | |
| "-DSQLITE_OMIT_AUTOINIT", | |
| "-DSQLITE_ENABLE_JSON1", | |
| "-DSQLITE_ENABLE_MATH_FUNCTIONS", | |
| ] | |
| cflags += [ "-Wno-incompatible-pointer-types-discards-qualifiers" ] | |
| if (is_clang && is_win) { | |
| # SQLite uses __int64 which clang complains about unless | |
| # we specify this flag. | |
| cflags += [ "-Wno-language-extension-token" ] | |
| } | |
| if (is_gcc) { | |
| cflags += [ "-Wno-stringop-overread" ] | |
| } | |
| } | |
| source_set("sqlite") { | |
| visibility = _buildtools_visibility | |
| if (perfetto_use_system_sqlite) { | |
| # Use the system sqlite library instead of the hermetic one. | |
| libs = [ "sqlite3" ] | |
| } else { | |
| sources = [ | |
| "sqlite/sqlite3.c", | |
| "sqlite/sqlite3.h", | |
| "sqlite/sqlite3ext.h", | |
| "sqlite_src/ext/misc/percentile.c", | |
| ] | |
| } | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":sqlite_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| source_set("lzma") { | |
| visibility = _buildtools_visibility | |
| defines = [ "_7ZIP_ST" ] | |
| sources = [ | |
| "lzma/C/7zAlloc.c", | |
| "lzma/C/7zArcIn.c", | |
| "lzma/C/7zBuf.c", | |
| "lzma/C/7zBuf2.c", | |
| "lzma/C/7zCrc.c", | |
| "lzma/C/7zCrcOpt.c", | |
| "lzma/C/7zDec.c", | |
| "lzma/C/7zFile.c", | |
| "lzma/C/7zStream.c", | |
| "lzma/C/Aes.c", | |
| "lzma/C/AesOpt.c", | |
| "lzma/C/Alloc.c", | |
| "lzma/C/Bcj2.c", | |
| "lzma/C/Bra.c", | |
| "lzma/C/Bra86.c", | |
| "lzma/C/BraIA64.c", | |
| "lzma/C/CpuArch.c", | |
| "lzma/C/Delta.c", | |
| "lzma/C/LzFind.c", | |
| "lzma/C/Lzma2Dec.c", | |
| "lzma/C/Lzma2Enc.c", | |
| "lzma/C/Lzma86Dec.c", | |
| "lzma/C/Lzma86Enc.c", | |
| "lzma/C/LzmaDec.c", | |
| "lzma/C/LzmaEnc.c", | |
| "lzma/C/LzmaLib.c", | |
| "lzma/C/Ppmd7.c", | |
| "lzma/C/Ppmd7Dec.c", | |
| "lzma/C/Ppmd7Enc.c", | |
| "lzma/C/Sha256.c", | |
| "lzma/C/Sort.c", | |
| "lzma/C/Xz.c", | |
| "lzma/C/XzCrc64.c", | |
| "lzma/C/XzCrc64Opt.c", | |
| "lzma/C/XzDec.c", | |
| "lzma/C/XzEnc.c", | |
| "lzma/C/XzIn.c", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| cflags = [ | |
| "-Wno-empty-body", | |
| "-Wno-enum-conversion", | |
| ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| source_set("zlib") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "zlib/adler32.c", | |
| "zlib/chromeconf.h", | |
| "zlib/compress.c", | |
| "zlib/contrib/optimizations/insert_string.h", | |
| "zlib/cpu_features.c", | |
| "zlib/cpu_features.h", | |
| "zlib/crc32.c", | |
| "zlib/crc32.h", | |
| "zlib/deflate.c", | |
| "zlib/deflate.h", | |
| "zlib/gzclose.c", | |
| "zlib/gzguts.h", | |
| "zlib/gzlib.c", | |
| "zlib/gzread.c", | |
| "zlib/gzwrite.c", | |
| "zlib/infback.c", | |
| "zlib/inffast.c", | |
| "zlib/inffast.h", | |
| "zlib/inffixed.h", | |
| "zlib/inflate.c", | |
| "zlib/inflate.h", | |
| "zlib/inftrees.c", | |
| "zlib/inftrees.h", | |
| "zlib/trees.c", | |
| "zlib/trees.h", | |
| "zlib/uncompr.c", | |
| "zlib/zconf.h", | |
| "zlib/zlib.h", | |
| "zlib/zutil.c", | |
| "zlib/zutil.h", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":zlib_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| if (is_win) { | |
| defines = [ "X86_WINDOWS" ] | |
| } | |
| # TODO(primiano): look into ADLER32_SIMD_SSSE3 and other SIMD optimizations | |
| # (from chromium's third_party/zlib/BUILD.gn). | |
| } | |
| config("zlib_config") { | |
| visibility = _buildtools_visibility | |
| defines = [ | |
| "ZLIB_IMPLEMENTATION", | |
| "CHROMIUM_ZLIB_NO_CHROMECONF", | |
| ] | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to suppress | |
| # warnings coming from third-party headers. Doing so would mask warnings in | |
| # our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("zlib", root_build_dir), | |
| ] | |
| if (is_clang) { | |
| cflags += [ | |
| "-Wno-unknown-warning-option", | |
| "-Wno-deprecated-non-prototype", | |
| "-Wno-macro-redefined", | |
| ] | |
| } | |
| } | |
| source_set("zstd") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "zstd/lib/common/allocations.h", | |
| "zstd/lib/common/bits.h", | |
| "zstd/lib/common/bitstream.h", | |
| "zstd/lib/common/compiler.h", | |
| "zstd/lib/common/cpu.h", | |
| "zstd/lib/common/debug.c", | |
| "zstd/lib/common/debug.h", | |
| "zstd/lib/common/entropy_common.c", | |
| "zstd/lib/common/error_private.c", | |
| "zstd/lib/common/error_private.h", | |
| "zstd/lib/common/fse.h", | |
| "zstd/lib/common/fse_decompress.c", | |
| "zstd/lib/common/huf.h", | |
| "zstd/lib/common/mem.h", | |
| "zstd/lib/common/pool.c", | |
| "zstd/lib/common/pool.h", | |
| "zstd/lib/common/portability_macros.h", | |
| "zstd/lib/common/threading.c", | |
| "zstd/lib/common/threading.h", | |
| "zstd/lib/common/xxhash.c", | |
| "zstd/lib/common/xxhash.h", | |
| "zstd/lib/common/zstd_common.c", | |
| "zstd/lib/common/zstd_deps.h", | |
| "zstd/lib/common/zstd_internal.h", | |
| "zstd/lib/common/zstd_trace.h", | |
| "zstd/lib/compress/clevels.h", | |
| "zstd/lib/compress/fse_compress.c", | |
| "zstd/lib/compress/hist.c", | |
| "zstd/lib/compress/hist.h", | |
| "zstd/lib/compress/huf_compress.c", | |
| "zstd/lib/compress/zstd_compress.c", | |
| "zstd/lib/compress/zstd_compress_internal.h", | |
| "zstd/lib/compress/zstd_compress_literals.c", | |
| "zstd/lib/compress/zstd_compress_literals.h", | |
| "zstd/lib/compress/zstd_compress_sequences.c", | |
| "zstd/lib/compress/zstd_compress_sequences.h", | |
| "zstd/lib/compress/zstd_compress_superblock.c", | |
| "zstd/lib/compress/zstd_compress_superblock.h", | |
| "zstd/lib/compress/zstd_cwksp.h", | |
| "zstd/lib/compress/zstd_double_fast.c", | |
| "zstd/lib/compress/zstd_double_fast.h", | |
| "zstd/lib/compress/zstd_fast.c", | |
| "zstd/lib/compress/zstd_fast.h", | |
| "zstd/lib/compress/zstd_lazy.c", | |
| "zstd/lib/compress/zstd_lazy.h", | |
| "zstd/lib/compress/zstd_ldm.c", | |
| "zstd/lib/compress/zstd_ldm.h", | |
| "zstd/lib/compress/zstd_ldm_geartab.h", | |
| "zstd/lib/compress/zstd_opt.c", | |
| "zstd/lib/compress/zstd_opt.h", | |
| "zstd/lib/compress/zstd_preSplit.c", | |
| "zstd/lib/compress/zstd_preSplit.h", | |
| "zstd/lib/compress/zstdmt_compress.c", | |
| "zstd/lib/compress/zstdmt_compress.h", | |
| "zstd/lib/decompress/huf_decompress.c", | |
| "zstd/lib/decompress/zstd_ddict.c", | |
| "zstd/lib/decompress/zstd_ddict.h", | |
| "zstd/lib/decompress/zstd_decompress.c", | |
| "zstd/lib/decompress/zstd_decompress_block.c", | |
| "zstd/lib/decompress/zstd_decompress_block.h", | |
| "zstd/lib/decompress/zstd_decompress_internal.h", | |
| "zstd/lib/deprecated/zbuff.h", | |
| "zstd/lib/deprecated/zbuff_common.c", | |
| "zstd/lib/deprecated/zbuff_compress.c", | |
| "zstd/lib/deprecated/zbuff_decompress.c", | |
| "zstd/lib/dictBuilder/cover.c", | |
| "zstd/lib/dictBuilder/cover.h", | |
| "zstd/lib/dictBuilder/divsufsort.c", | |
| "zstd/lib/dictBuilder/divsufsort.h", | |
| "zstd/lib/dictBuilder/fastcover.c", | |
| "zstd/lib/dictBuilder/zdict.c", | |
| "zstd/lib/zdict.h", | |
| "zstd/lib/zstd.h", | |
| "zstd/lib/zstd_errors.h", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":zstd_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| config("zstd_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| perfetto_isystem_cflag, | |
| rebase_path("zstd/lib", root_build_dir), | |
| ] | |
| if (current_cpu == "x64") { | |
| defines = [ "ZSTD_DISABLE_ASM" ] | |
| } | |
| } | |
| # For standalone profiler builds. | |
| source_set("libunwindstack") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "android-unwinding/libunwindstack/include", | |
| "android-unwinding/libunwindstack", | |
| "android-libbase/include", | |
| "android-logging/liblog/include", | |
| "android-libprocinfo/include", | |
| "android-core/include", | |
| "android-core/libcutils/include", | |
| "bionic/libc/async_safe/include", | |
| "bionic/libc/platform/", | |
| "lzma/C", | |
| "zstd/lib", | |
| ] | |
| deps = [ | |
| ":lzma", | |
| ":zlib", | |
| ":zstd", | |
| "//gn:default_deps", | |
| ] | |
| sources = [ | |
| "android-libbase/file.cpp", | |
| "android-libbase/stringprintf.cpp", | |
| "android-libbase/strings.cpp", | |
| "android-unwinding/libunwindstack/ArmExidx.cpp", | |
| "android-unwinding/libunwindstack/Demangle.cpp", | |
| "android-unwinding/libunwindstack/DwarfCfa.cpp", | |
| "android-unwinding/libunwindstack/DwarfEhFrameWithHdr.cpp", | |
| "android-unwinding/libunwindstack/DwarfMemory.cpp", | |
| "android-unwinding/libunwindstack/DwarfOp.cpp", | |
| "android-unwinding/libunwindstack/DwarfSection.cpp", | |
| "android-unwinding/libunwindstack/Elf.cpp", | |
| "android-unwinding/libunwindstack/ElfInterface.cpp", | |
| "android-unwinding/libunwindstack/ElfInterfaceArm.cpp", | |
| "android-unwinding/libunwindstack/Global.cpp", | |
| "android-unwinding/libunwindstack/JitDebug.cpp", | |
| "android-unwinding/libunwindstack/MapInfo.cpp", | |
| "android-unwinding/libunwindstack/Maps.cpp", | |
| "android-unwinding/libunwindstack/Memory.cpp", | |
| "android-unwinding/libunwindstack/MemoryXz.cpp", | |
| "android-unwinding/libunwindstack/Regs.cpp", | |
| "android-unwinding/libunwindstack/RegsArm.cpp", | |
| "android-unwinding/libunwindstack/RegsArm64.cpp", | |
| "android-unwinding/libunwindstack/RegsRiscv64.cpp", | |
| "android-unwinding/libunwindstack/RegsX86.cpp", | |
| "android-unwinding/libunwindstack/RegsX86_64.cpp", | |
| "android-unwinding/libunwindstack/Symbols.cpp", | |
| "android-unwinding/libunwindstack/Unwinder.cpp", | |
| ] | |
| if (!is_android) { | |
| sources += [ | |
| "android-libbase/logging.cpp", | |
| "android-libbase/threads.cpp", | |
| "android-logging/liblog/logger_write.cpp", | |
| "android-logging/liblog/properties.cpp", | |
| "android-unwinding/libunwindstack/LogStdout.cpp", | |
| "android-unwinding/libunwindstack/MemoryMte.cpp", | |
| ] | |
| } else { | |
| sources += [ "android-unwinding/libunwindstack/LogAndroid.cpp" ] | |
| } | |
| if (current_cpu == "x86") { | |
| sources += [ "android-unwinding/libunwindstack/AsmGetRegsX86.S" ] | |
| } else if (current_cpu == "x64") { | |
| sources += [ "android-unwinding/libunwindstack/AsmGetRegsX86_64.S" ] | |
| } | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone:visibility_hidden", | |
| ] | |
| cflags = [ | |
| "-DFAKE_LOG_DEVICE=1", | |
| # android-unwinding/libunwindstack/Memory.cpp uses the macro | |
| # TEMP_FAILURE_RETRY which is only defined in bionic and glibc. | |
| # To fix the musl build, force include libbase's polyfill header. | |
| # Android's musl build succeeds because of a separate polyfill: | |
| # https://cs.android.com/android/platform/superproject/+/android-latest-release:external/musl/android/include/unistd.h;bpv=1 | |
| "-include", | |
| "android-base/macros.h", | |
| ] | |
| if (!is_win) { | |
| cflags += [ | |
| "-Wno-deprecated-declarations", | |
| "-Wno-vla-cxx-extension", | |
| "-Wno-c99-designator", | |
| ] | |
| } | |
| public_configs = [ ":libunwindstack_config" ] | |
| } | |
| config("bionic_kernel_uapi_headers") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| perfetto_isystem_cflag, | |
| rebase_path("bionic/libc/kernel", root_build_dir), | |
| ] | |
| } | |
| config("no_format_warning") { | |
| if (!is_win || is_clang) { | |
| cflags = [ "-Wno-format" ] | |
| } | |
| } | |
| if (enable_perfetto_trace_processor_mac_instruments) { | |
| config("expat_public_config") { | |
| defines = [ "XML_STATIC" ] | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to | |
| # suppress warnings coming from third-party headers. Doing so would mask | |
| # warnings in our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("expat/src/expat/lib", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("expat/include", root_build_dir), | |
| ] | |
| } | |
| source_set("expat") { | |
| sources = [ | |
| "expat/src/expat/lib/expat.h", | |
| "expat/src/expat/lib/xmlparse.c", | |
| "expat/src/expat/lib/xmlrole.c", | |
| "expat/src/expat/lib/xmltok.c", | |
| ] | |
| public_configs = [ ":expat_public_config" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| configs += [ ":no_format_warning" ] | |
| defines = [ | |
| "_LIB", | |
| "HAVE_EXPAT_CONFIG_H", | |
| ] | |
| } | |
| } | |
| config("linenoise_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to suppress | |
| # warnings coming from third-party headers. Doing so would mask warnings in | |
| # our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("linenoise", root_build_dir), | |
| ] | |
| } | |
| source_set("linenoise") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "linenoise/linenoise.c", | |
| "linenoise/linenoise.h", | |
| ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":linenoise_config" ] | |
| cflags = [ "-Wno-tautological-unsigned-zero-compare" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| if (use_libfuzzer) { | |
| source_set("libfuzzer") { | |
| visibility = _buildtools_visibility | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone/sanitizers:sanitizers_cflags", | |
| ] | |
| sources = [ | |
| "libfuzzer/FuzzerCrossOver.cpp", | |
| "libfuzzer/FuzzerDataFlowTrace.cpp", | |
| "libfuzzer/FuzzerDriver.cpp", | |
| "libfuzzer/FuzzerExtFunctionsDlsym.cpp", | |
| "libfuzzer/FuzzerExtFunctionsWeak.cpp", | |
| "libfuzzer/FuzzerExtFunctionsWindows.cpp", | |
| "libfuzzer/FuzzerExtraCounters.cpp", | |
| "libfuzzer/FuzzerFork.cpp", | |
| "libfuzzer/FuzzerIO.cpp", | |
| "libfuzzer/FuzzerIOPosix.cpp", | |
| "libfuzzer/FuzzerIOWindows.cpp", | |
| "libfuzzer/FuzzerLoop.cpp", | |
| "libfuzzer/FuzzerMain.cpp", | |
| "libfuzzer/FuzzerMerge.cpp", | |
| "libfuzzer/FuzzerMutate.cpp", | |
| "libfuzzer/FuzzerSHA1.cpp", | |
| "libfuzzer/FuzzerTracePC.cpp", | |
| "libfuzzer/FuzzerUtil.cpp", | |
| "libfuzzer/FuzzerUtilDarwin.cpp", | |
| "libfuzzer/FuzzerUtilFuchsia.cpp", | |
| "libfuzzer/FuzzerUtilLinux.cpp", | |
| "libfuzzer/FuzzerUtilPosix.cpp", | |
| "libfuzzer/FuzzerUtilWindows.cpp", | |
| ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| } | |
| config("llvm_demangle_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "llvm-project/llvm/include" ] | |
| } | |
| source_set("llvm_demangle") { | |
| visibility = _buildtools_visibility | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| public_configs = [ ":llvm_demangle_config" ] | |
| sources = [ | |
| "llvm-project/llvm/include/llvm/Demangle/Demangle.h", | |
| "llvm-project/llvm/include/llvm/Demangle/DemangleConfig.h", | |
| "llvm-project/llvm/include/llvm/Demangle/ItaniumDemangle.h", | |
| "llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangle.h", | |
| "llvm-project/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h", | |
| "llvm-project/llvm/include/llvm/Demangle/StringViewExtras.h", | |
| "llvm-project/llvm/include/llvm/Demangle/Utility.h", | |
| "llvm-project/llvm/lib/Demangle/DLangDemangle.cpp", | |
| "llvm-project/llvm/lib/Demangle/Demangle.cpp", | |
| "llvm-project/llvm/lib/Demangle/ItaniumDemangle.cpp", | |
| "llvm-project/llvm/lib/Demangle/MicrosoftDemangle.cpp", | |
| "llvm-project/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp", | |
| "llvm-project/llvm/lib/Demangle/RustDemangle.cpp", | |
| ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| if (enable_perfetto_grpc) { | |
| config("grpc_boringssl_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "grpc/src/third_party/boringssl-with-bazel/src/include" ] | |
| if (is_gcc) { | |
| cflags = [ "-Wno-stringop-overflow" ] | |
| } | |
| } | |
| config("grpc_upb_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "grpc/src/third_party/upb", | |
| "grpc/src/src/core/ext/upb-generated", | |
| "grpc/src/src/core/ext/upbdefs-generated", | |
| ] | |
| } | |
| config("grpc_internal_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "grpc/src", | |
| "grpc/src/include", | |
| "grpc/src/src/core/ext/upb-gen", | |
| "grpc/src/src/core/ext/upbdefs-gen", | |
| "grpc/src/third_party/address_sorting/include", | |
| "grpc/src/third_party/upb", | |
| "grpc/src/third_party/utf8_range", | |
| "grpc/src/third_party/xxhash", | |
| ] | |
| cflags = [ | |
| "-DGRPC_ARES=0", | |
| "-DRE2_USE_ABSL", | |
| ] | |
| if (is_gcc) { | |
| cflags += [ | |
| "-Wno-attributes", | |
| "-Wno-return-type", | |
| "-Wno-trigraphs", | |
| ] | |
| } | |
| } | |
| config("grpc_gen_config") { | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to | |
| # suppress warnings coming from libprotobuf headers. Doing so would mask | |
| # warnings in our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("grpc/src/include", root_build_dir), | |
| perfetto_isystem_cflag, | |
| rebase_path("abseil-cpp", root_build_dir), | |
| ] | |
| # This issues appear in .grpc.pb.h files so we unfortunately need to leak | |
| # the cflags outside of just compiling this code. | |
| if (is_clang && !is_win) { | |
| cflags += [ | |
| "-Wno-weak-vtables", | |
| "-Wno-suggest-destructor-override", | |
| ] | |
| } | |
| } | |
| config("grpc_public_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| perfetto_isystem_cflag, | |
| rebase_path("grpc/src/include", root_build_dir), | |
| ] | |
| } | |
| config("cpp_httplib_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| perfetto_isystem_cflag, | |
| rebase_path("cpp-httplib", root_build_dir), | |
| ] | |
| } | |
| source_set("cpp_httplib") { | |
| visibility = _buildtools_visibility | |
| sources = [ "cpp-httplib/httplib.h" ] | |
| public_configs = [ ":cpp_httplib_config" ] | |
| deps = [ "//gn:default_deps" ] | |
| } | |
| } | |
| if (enable_perfetto_etm_importer) { | |
| config("open_csd_config") { | |
| visibility = _buildtools_visibility | |
| cflags = [ | |
| # Using -isystem instead of include_dirs (-I), so we don't need to | |
| # suppress warnings coming from third-party headers. Doing so would mask | |
| # warnings in our own code. | |
| perfetto_isystem_cflag, | |
| rebase_path("open_csd/decoder/include", root_build_dir), | |
| ] | |
| defines = [ "ENABLE_LARGE_TRACE_SOURCES" ] | |
| } | |
| source_set("open_csd") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "open_csd/decoder/source/c_api/ocsd_c_api.cpp", | |
| "open_csd/decoder/source/c_api/ocsd_c_api_custom_obj.cpp", | |
| "open_csd/decoder/source/c_api/ocsd_c_api_custom_obj.h", | |
| "open_csd/decoder/source/c_api/ocsd_c_api_obj.h", | |
| "open_csd/decoder/source/ete/trc_cmp_cfg_ete.cpp", | |
| "open_csd/decoder/source/etmv3/trc_cmp_cfg_etmv3.cpp", | |
| "open_csd/decoder/source/etmv3/trc_pkt_decode_etmv3.cpp", | |
| "open_csd/decoder/source/etmv3/trc_pkt_elem_etmv3.cpp", | |
| "open_csd/decoder/source/etmv3/trc_pkt_proc_etmv3.cpp", | |
| "open_csd/decoder/source/etmv3/trc_pkt_proc_etmv3_impl.cpp", | |
| "open_csd/decoder/source/etmv3/trc_pkt_proc_etmv3_impl.h", | |
| "open_csd/decoder/source/etmv4/trc_cmp_cfg_etmv4.cpp", | |
| "open_csd/decoder/source/etmv4/trc_etmv4_stack_elem.cpp", | |
| "open_csd/decoder/source/etmv4/trc_pkt_decode_etmv4i.cpp", | |
| "open_csd/decoder/source/etmv4/trc_pkt_elem_etmv4i.cpp", | |
| "open_csd/decoder/source/etmv4/trc_pkt_proc_etmv4i.cpp", | |
| "open_csd/decoder/source/i_dec/trc_i_decode.cpp", | |
| "open_csd/decoder/source/i_dec/trc_idec_arminst.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_base.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_bufptr.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_cache.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_cb.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_file.cpp", | |
| "open_csd/decoder/source/mem_acc/trc_mem_acc_mapper.cpp", | |
| "open_csd/decoder/source/ocsd_code_follower.cpp", | |
| "open_csd/decoder/source/ocsd_dcd_tree.cpp", | |
| "open_csd/decoder/source/ocsd_error.cpp", | |
| "open_csd/decoder/source/ocsd_error_logger.cpp", | |
| "open_csd/decoder/source/ocsd_gen_elem_list.cpp", | |
| "open_csd/decoder/source/ocsd_gen_elem_stack.cpp", | |
| "open_csd/decoder/source/ocsd_lib_dcd_register.cpp", | |
| "open_csd/decoder/source/ocsd_msg_logger.cpp", | |
| "open_csd/decoder/source/ocsd_version.cpp", | |
| "open_csd/decoder/source/pkt_printers/gen_elem_printer.cpp", | |
| "open_csd/decoder/source/pkt_printers/raw_frame_printer.cpp", | |
| "open_csd/decoder/source/pkt_printers/trc_print_fact.cpp", | |
| "open_csd/decoder/source/ptm/trc_cmp_cfg_ptm.cpp", | |
| "open_csd/decoder/source/ptm/trc_pkt_decode_ptm.cpp", | |
| "open_csd/decoder/source/ptm/trc_pkt_elem_ptm.cpp", | |
| "open_csd/decoder/source/ptm/trc_pkt_proc_ptm.cpp", | |
| "open_csd/decoder/source/stm/trc_pkt_decode_stm.cpp", | |
| "open_csd/decoder/source/stm/trc_pkt_elem_stm.cpp", | |
| "open_csd/decoder/source/stm/trc_pkt_proc_stm.cpp", | |
| "open_csd/decoder/source/trc_component.cpp", | |
| "open_csd/decoder/source/trc_core_arch_map.cpp", | |
| "open_csd/decoder/source/trc_frame_deformatter.cpp", | |
| "open_csd/decoder/source/trc_frame_deformatter_impl.h", | |
| "open_csd/decoder/source/trc_gen_elem.cpp", | |
| "open_csd/decoder/source/trc_printable_elem.cpp", | |
| "open_csd/decoder/source/trc_ret_stack.cpp", | |
| ] | |
| cflags = [ | |
| "-Wno-switch", | |
| "-Wno-deprecated-declarations", | |
| ] | |
| configs -= [ | |
| "//gn/standalone:extra_warnings", | |
| "//gn/standalone:no_exceptions", | |
| "//gn/standalone:rtti_cflags", | |
| ] | |
| include_dirs = [ "open_csd/decoder/include" ] | |
| public_configs = [ ":open_csd_config" ] | |
| } | |
| } | |
| if (enable_perfetto_re2) { | |
| config("re2_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ "re2" ] | |
| defines = [ "RE2_USE_ABSL" ] | |
| # On Windows, NULL expands to 0 (not nullptr), which triggers this | |
| # warning in re2 headers included from our code. The MS ABI bit-field | |
| # packing warning fires on the intentional bit-fields in re2/re2/re2.h | |
| # and is a false positive on non-Windows targets. | |
| if (is_clang) { | |
| cflags = [ "-Wno-ms-bitfield-padding" ] | |
| if (is_win) { | |
| cflags += [ "-Wno-zero-as-null-pointer-constant" ] | |
| } | |
| } | |
| } | |
| # Use source_set for WASM to avoid the alink step — macOS libtool rejects | |
| # emscripten .o files. For native builds, static_library is more efficient | |
| # as it deduplicates objects when multiple targets depend on RE2. | |
| if (is_wasm) { | |
| _re2_target_type = "source_set" | |
| } else { | |
| _re2_target_type = "static_library" | |
| } | |
| target(_re2_target_type, "re2") { | |
| visibility = _buildtools_visibility | |
| sources = [ | |
| "re2/re2/bitmap256.cc", | |
| "re2/re2/bitmap256.h", | |
| "re2/re2/bitstate.cc", | |
| "re2/re2/compile.cc", | |
| "re2/re2/dfa.cc", | |
| "re2/re2/filtered_re2.cc", | |
| "re2/re2/mimics_pcre.cc", | |
| "re2/re2/nfa.cc", | |
| "re2/re2/onepass.cc", | |
| "re2/re2/parse.cc", | |
| "re2/re2/perl_groups.cc", | |
| "re2/re2/pod_array.h", | |
| "re2/re2/prefilter.cc", | |
| "re2/re2/prefilter.h", | |
| "re2/re2/prefilter_tree.cc", | |
| "re2/re2/prefilter_tree.h", | |
| "re2/re2/prog.cc", | |
| "re2/re2/prog.h", | |
| "re2/re2/re2.cc", | |
| "re2/re2/regexp.cc", | |
| "re2/re2/regexp.h", | |
| "re2/re2/set.cc", | |
| "re2/re2/simplify.cc", | |
| "re2/re2/sparse_array.h", | |
| "re2/re2/sparse_set.h", | |
| "re2/re2/tostring.cc", | |
| "re2/re2/unicode_casefold.cc", | |
| "re2/re2/unicode_casefold.h", | |
| "re2/re2/unicode_groups.cc", | |
| "re2/re2/unicode_groups.h", | |
| "re2/re2/walker-inl.h", | |
| "re2/util/rune.cc", | |
| "re2/util/strutil.cc", | |
| "re2/util/strutil.h", | |
| "re2/util/utf.h", | |
| ] | |
| public_configs = [ ":re2_config" ] | |
| public_deps = [ ":abseil_cpp" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| } | |
| } | |
| if (enable_perfetto_pcre2) { | |
| # PCRE2 ships .generic/.dist templates instead of ready-to-use files | |
| # (see github.com/PCRE2Project/pcre2/blob/master/NON-AUTOTOOLS-BUILD). | |
| # Copy them to the expected names at build time. | |
| copy("pcre2_generated") { | |
| sources = [ | |
| "pcre2/src/config.h.generic", | |
| "pcre2/src/pcre2.h.generic", | |
| "pcre2/src/pcre2_chartables.c.dist", | |
| ] | |
| outputs = [ "$target_gen_dir/pcre2/{{source_name_part}}" ] | |
| } | |
| config("pcre2_config") { | |
| visibility = _buildtools_visibility | |
| include_dirs = [ | |
| "$target_gen_dir/pcre2", | |
| "pcre2/src", | |
| ] | |
| } | |
| static_library("pcre2") { | |
| visibility = _buildtools_visibility | |
| deps = [ ":pcre2_generated" ] | |
| public_configs = [ ":pcre2_config" ] | |
| configs -= [ "//gn/standalone:extra_warnings" ] | |
| sources = [ | |
| "$target_gen_dir/pcre2/pcre2_chartables.c", | |
| "pcre2/src/pcre2_auto_possess.c", | |
| "pcre2/src/pcre2_chkdint.c", | |
| "pcre2/src/pcre2_compile.c", | |
| "pcre2/src/pcre2_config.c", | |
| "pcre2/src/pcre2_context.c", | |
| "pcre2/src/pcre2_convert.c", | |
| "pcre2/src/pcre2_dfa_match.c", | |
| "pcre2/src/pcre2_error.c", | |
| "pcre2/src/pcre2_extuni.c", | |
| "pcre2/src/pcre2_find_bracket.c", | |
| "pcre2/src/pcre2_jit_compile.c", | |
| "pcre2/src/pcre2_maketables.c", | |
| "pcre2/src/pcre2_match.c", | |
| "pcre2/src/pcre2_match_data.c", | |
| "pcre2/src/pcre2_newline.c", | |
| "pcre2/src/pcre2_ord2utf.c", | |
| "pcre2/src/pcre2_pattern_info.c", | |
| "pcre2/src/pcre2_script_run.c", | |
| "pcre2/src/pcre2_serialize.c", | |
| "pcre2/src/pcre2_string_utils.c", | |
| "pcre2/src/pcre2_study.c", | |
| "pcre2/src/pcre2_substitute.c", | |
| "pcre2/src/pcre2_substring.c", | |
| "pcre2/src/pcre2_tables.c", | |
| "pcre2/src/pcre2_ucd.c", | |
| "pcre2/src/pcre2_valid_utf.c", | |
| "pcre2/src/pcre2_xclass.c", | |
| ] | |
| cflags = [ | |
| "-DHAVE_CONFIG_H", | |
| "-DPCRE2_CODE_UNIT_WIDTH=8", | |
| "-DSUPPORT_JIT", | |
| ] | |
| include_dirs = [ | |
| "$target_gen_dir/pcre2", | |
| "pcre2/src", | |
| ] | |
| } | |
| } |