| # Copyright 2018 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # |
| # BUILD.gn doesn't compile all files in the directory to reduce build size. |
| # Missing files can be added if needed. |
| |
| import("//common-mk/mojom_bindings_generator.gni") |
| import("//common-mk/mojom_type_mappings_generator.gni") |
| import("//common-mk/pkg_config.gni") |
| import("//libchrome/build/buildflag_header.gni") |
| |
| libchrome_basever = read_file("BASE_VER", "trim string") |
| |
| group("all") { |
| deps = [ |
| ":install_basever", |
| ":install_buildflag_header", |
| ":install_header", |
| ":libchrome", |
| ":libchrome-test", |
| ] |
| if (use.mojo) { |
| deps += [ |
| ":install_mojom_generated", |
| ":libmojo", |
| ] |
| } |
| if (use.test) { |
| deps += [ ":optional_unittests" ] |
| } |
| } |
| |
| group("all_buildflags") { |
| deps = [ |
| ":allocator_buildflags", |
| ":allocator_debugging_buildflags", |
| ":allocator_logging_buildflags", |
| ":blink_buildflags", |
| ":branding_buildflags", |
| ":cfi_buildflags", |
| ":chromecast_buildflags", |
| ":chromeos_buildflags", |
| ":clang_profiling_buildflags", |
| ":compiler_buildflags", |
| ":debugging_buildflags", |
| ":feature_list_buildflags", |
| ":ios_cronet_buildflags", |
| ":ipc_buildflags", |
| ":message_pump_buildflags", |
| ":mojo_buildflags", |
| ":mojo_cpp_bindings_buildflags", |
| ":partition_allocator_buildflags", |
| ":partition_allocator_chromecast_buildflags", |
| ":partition_allocator_chromeos_buildflags", |
| ":profiler_buildflags", |
| ":rust_buildflags", |
| ":synchronization_buildflags", |
| ":tracing_buildflags", |
| ] |
| } |
| |
| config("libchrome_config") { |
| # TODO(hidehiko): Consolidate with build_config.h. |
| defines = [ |
| "OS_CHROMEOS", |
| "USE_NSS_CERTS", |
| "USE_SYSTEM_LIBEVENT", |
| "NO_TCMALLOC", |
| "MOJO_BACKWARDS_COMPAT", |
| "MOJO_CORE_LEGACY_PROTOCOL", |
| ] |
| if (use.asan) { |
| defines += [ |
| "LEAK_SANITIZER", |
| "DISABLE_ALLOCATOR_SANITIZER", |
| ] |
| } |
| |
| include_dirs = [ |
| ".", |
| "${root_gen_dir}/libchrome", # for generated buildflags headers |
| ] |
| cflags = [ |
| "-Wno-deprecated-register", |
| "-Wno-narrowing", |
| "-Wno-unreachable-code-return", |
| "-Wno-unused-local-typedefs", |
| "-Xclang-only=-Wno-char-subscripts", |
| ] |
| |
| # Address sanitizer + coverage builds do not support -z,defs. |
| if (!(use.asan || use.coverage)) { |
| ldflags = [ "-Wl,-z,defs" ] |
| } |
| } |
| |
| config("base_core_config") { |
| cflags = [ |
| # Suppressing warning in base/strings/stringprintf.cc. |
| "-Wno-format-nonliteral", |
| |
| # This is for _exit(1) in base/debug/debugger_posix.cc. |
| "-Wno-unreachable-code", |
| |
| # For double-conversion/strtod.cc |
| "-Wno-unused-function", |
| ] |
| } |
| |
| config("base_export_config") { |
| defines = [ |
| "COMPONENT_BUILD", |
| "BASE_IMPLEMENTATION", |
| "IS_PARTITION_ALLOC_IMPL", |
| ] |
| } |
| |
| config("crypto_export_config") { |
| defines = [ |
| "COMPONENT_BUILD", |
| "CRYPTO_IMPLEMENTATION", |
| ] |
| } |
| |
| config("dbus_export_config") { |
| defines = [ |
| "COMPONENT_BUILD", |
| "DBUS_IMPLEMENTATION", |
| ] |
| } |
| |
| config("policy_export_config") { |
| defines = [ |
| "COMPONENT_BUILD", |
| "POLICY_COMPONENT_IMPLEMENTATION", |
| ] |
| } |
| |
| config("mojo_export_config") { |
| defines = [ "COMPONENT_BUILD" ] |
| } |
| |
| source_set("buildflag_header_h") { |
| sources = [ "build/buildflag.h" ] |
| } |
| |
| buildflag_header("allocator_buildflags") { |
| header = "base/allocator/buildflags.h" |
| flags = [ |
| "USE_ALLOCATOR_SHIM=false", |
| "USE_PARTITION_ALLOC=false", |
| "USE_PARTITION_ALLOC_AS_MALLOC=false", |
| "USE_BACKUP_REF_PTR=false", |
| "USE_ASAN_BACKUP_REF_PTR=false", |
| "USE_MTE_CHECKED_PTR=false", |
| ] |
| } |
| |
| buildflag_header("allocator_logging_buildflags") { |
| header = "base/allocator/partition_allocator/logging_buildflags.h" |
| |
| flags = [ "PA_ENABLE_LOG_ERROR_NOT_REACHED=false" ] |
| } |
| |
| buildflag_header("partition_allocator_buildflags") { |
| # Copied from base/allocator/partition_allocator/partition_alloc.gni without |
| # using is_nacl. |
| if (current_cpu == "x64" || current_cpu == "arm64") { |
| has_64_bit_pointers = true |
| } else if (current_cpu == "x86" || current_cpu == "arm") { |
| has_64_bit_pointers = false |
| } else { |
| assert(false, "Unknown CPU: $current_cpu") |
| } |
| |
| header = "base/allocator/partition_allocator/partition_alloc_buildflags.h" |
| flags = [ |
| "HAS_64_BIT_POINTERS=$has_64_bit_pointers", |
| "USE_PARTITION_ALLOC=false", |
| "USE_PARTITION_ALLOC_AS_MALLOC=false", |
| "USE_ASAN_BACKUP_REF_PTR=false", |
| "USE_HOOKABLE_RAW_PTR=false", |
| "BACKUP_REF_PTR_POISON_OOB_PTR=false", |
| "ENABLE_PARTITION_ALLOC_AS_MALLOC_SUPPORT=false", |
| "ENABLE_BACKUP_REF_PTR_SUPPORT=false", |
| "ENABLE_BACKUP_REF_PTR_SLOW_CHECKS=false", |
| "ENABLE_DANGLING_RAW_PTR_CHECKS=false", |
| "PUT_REF_COUNT_IN_PREVIOUS_SLOT=false", |
| "ENABLE_MTE_CHECKED_PTR_SUPPORT=false", |
| "RECORD_ALLOC_INFO=false", |
| "GLUE_CORE_POOLS=false", |
| "ENABLE_SHADOW_METADATA_FOR_64_BITS_POINTERS=false", |
| "USE_STARSCAN=false", |
| "PA_USE_BASE_TRACING=false", |
| "ENABLE_PKEYS=false", |
| "ENABLE_POINTER_COMPRESSION=false", |
| "USE_ASAN_UNOWNED_PTR=false", |
| "FORCE_ENABLE_RAW_PTR_EXCLUSION=false", |
| "ENABLE_RAW_PTR_EXPERIMENTAL=false", |
| "ENABLE_THREAD_ISOLATION=false", |
| "USE_FREESLOT_BITMAP=false", |
| ] |
| } |
| |
| buildflag_header("partition_allocator_chromecast_buildflags") { |
| header = "base/allocator/partition_allocator/chromecast_buildflags.h" |
| flags = [ |
| "PA_IS_CAST_ANDROID=false", |
| "PA_IS_CASTOS=false", |
| ] |
| } |
| |
| buildflag_header("partition_allocator_chromeos_buildflags") { |
| header = "base/allocator/partition_allocator/chromeos_buildflags.h" |
| flags = [ "PA_IS_CHROMEOS_ASH=false" ] |
| } |
| |
| buildflag_header("allocator_debugging_buildflags") { |
| header = "base/allocator/partition_allocator/partition_alloc_base/debug/debugging_buildflags.h" |
| flags = [ |
| "PA_DCHECK_IS_ON=false", |
| "PA_EXPENSIVE_DCHECKS_ARE_ON=false", |
| "PA_DCHECK_IS_CONFIGURABLE=false", |
| ] |
| } |
| |
| buildflag_header("blink_buildflags") { |
| header = "build/blink_buildflags.h" |
| |
| flags = [ "USE_BLINK=false" ] |
| } |
| |
| buildflag_header("branding_buildflags") { |
| header = "build/branding_buildflags.h" |
| |
| flags = [ |
| "CHROMIUM_BRANDING=true", |
| "GOOGLE_CHROME_BRANDING=false", |
| ] |
| } |
| |
| buildflag_header("cfi_buildflags") { |
| header = "base/cfi_buildflags.h" |
| flags = [ |
| "CFI_DIAG=false", |
| "CFI_ICALL_CHECK=false", |
| "CFI_ENFORCEMENT_TRAP=false", |
| ] |
| } |
| |
| buildflag_header("chromecast_buildflags") { |
| header = "build/chromecast_buildflags.h" |
| flags = [ "IS_CHROME_CAST=false" ] |
| } |
| |
| buildflag_header("chromeos_buildflags") { |
| header = "build/chromeos_buildflags.h" |
| flags = [ |
| "IS_CHROMEOS_DEVICE=false", |
| "IS_CHROMEOS_LACROS=false", |
| "IS_CHROMEOS_ASH=true", |
| |
| # "IS_CHROMEOS_WITH_HW_DETAILS=", |
| # "IS_REVEN=", |
| ] |
| } |
| |
| buildflag_header("clang_profiling_buildflags") { |
| header = "base/clang_profiling_buildflags.h" |
| flags = [ |
| "CLANG_PROFILING=false", |
| # "CLANG_PROFILING_INSIDE_SANDBOX=", |
| # "USE_CLANG_COVERAGE=", |
| ] |
| } |
| |
| buildflag_header("compiler_buildflags") { |
| header = "build/config/compiler/compiler_buildflags.h" |
| flags = [ |
| "CLANG_PGO=0", |
| "SYMBOL_LEVEL=1", |
| ] |
| } |
| |
| buildflag_header("debugging_buildflags") { |
| header = "base/debug/debugging_buildflags.h" |
| flags = [ |
| "DCHECK_IS_CONFIGURABLE=false", |
| "ENABLE_LOCATION_SOURCE=true", |
| "FROM_HERE_USES_LOCATION_BUILTINS=true", |
| "ENABLE_PROFILING=false", |
| "CAN_UNWIND_WITH_FRAME_POINTERS=true", |
| "ENABLE_COMMANDLINE_SEQUENCE_CHECKS=true", |
| |
| # "UNSAFE_DEVELOPER_BUILD=", |
| "CAN_UNWIND_WITH_CFI_TABLE=false", |
| |
| # "EXCLUDE_UNWIND_TABLES=", |
| "ENABLE_GDBINIT_WARNING=false", |
| |
| # "ENABLE_LLDBINIT_WARNING=", |
| "EXPENSIVE_DCHECKS_ARE_ON=false", |
| |
| # "ENABLE_STACK_TRACE_LINE_NUMBERS=", |
| ] |
| } |
| |
| buildflag_header("feature_list_buildflags") { |
| header = "base/feature_list_buildflags.h" |
| flags = [ "ENABLE_BANNED_BASE_FEATURE_PREFIX=false" ] |
| } |
| |
| buildflag_header("ios_cronet_buildflags") { |
| header = "base/message_loop/ios_cronet_buildflags.h" |
| flags = [ "CRONET_BUILD=false" ] |
| } |
| |
| buildflag_header("ipc_buildflags") { |
| header = "ipc/ipc_buildflags.h" |
| flags = [ "IPC_MESSAGE_LOG_ENABLED=false" ] |
| } |
| |
| buildflag_header("message_pump_buildflags") { |
| header = "base/message_loop/message_pump_buildflags.h" |
| flags = [ "ENABLE_MESSAGE_PUMP_EPOLL=true" ] |
| } |
| |
| buildflag_header("mojo_buildflags") { |
| header = "mojo/buildflags.h" |
| flags = [ "MOJO_USE_APPLE_CHANNEL=false" ] |
| } |
| |
| buildflag_header("mojo_cpp_bindings_buildflags") { |
| header = "mojo/public/cpp/bindings/mojo_buildflags.h" |
| flags = [ |
| "MOJO_TRACE_ENABLED=false", |
| "MOJO_RANDOM_DELAYS_ENABLED=false", |
| ] |
| } |
| |
| buildflag_header("profiler_buildflags") { |
| header = "base/profiler/profiler_buildflags.h" |
| flags = [ |
| "ENABLE_ARM_CFI_TABLE=false", |
| "IOS_STACK_PROFILER_ENABLED=true", |
| "USE_ANDROID_UNWINDER_V2=false", |
| ] |
| } |
| |
| buildflag_header("rust_buildflags") { |
| header = "base/rust_buildflags.h" |
| flags = [ |
| "BUILD_RUST_JSON_READER=false", |
| "BUILD_RUST_BASE_CONVERSIONS=false", |
| ] |
| } |
| |
| buildflag_header("synchronization_buildflags") { |
| header = "base/synchronization/synchronization_buildflags.h" |
| flags = [ "ENABLE_MUTEX_PRIORITY_INHERITANCE=false" ] |
| } |
| |
| buildflag_header("tracing_buildflags") { |
| header = "base/tracing_buildflags.h" |
| flags = [ |
| "ENABLE_BASE_TRACING=true", |
| "USE_PERFETTO_CLIENT_LIBRARY=false", |
| "USE_PERFETTO_TRACE_PROCESSOR=false", |
| |
| # "OPTIONAL_TRACE_EVENTS_ENABLED=", |
| ] |
| } |
| |
| libbase_sublibs = [ |
| { |
| name = "base-core" |
| libs = [ |
| "dl", |
| "double-conversion", |
| "pthread", |
| "rt", |
| "modp_b64", |
| ] |
| pkg_deps = [ |
| "absl", |
| "glib-2.0", |
| "libevent", |
| ] |
| configs = [ |
| ":base_core_config", |
| ":base_export_config", |
| ] |
| sources = [ |
| "base/allocator/partition_allocator/oom.cc", |
| "base/allocator/partition_allocator/oom_callback.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/check.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/debug/alias.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/logging.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/memory/page_size_posix.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/posix/safe_strerror.cc", |
| "base/allocator/partition_allocator/partition_alloc_base/strings/stringprintf.cc", |
| "base/at_exit.cc", |
| "base/barrier_closure.cc", |
| "base/base64.cc", |
| "base/base64url.cc", |
| "base/base_switches.cc", |
| "base/big_endian.cc", |
| "base/callback_list.cc", |
| "base/check.cc", |
| "base/check_is_test.cc", |
| "base/check_op.cc", |
| "base/command_line.cc", |
| "base/containers/intrusive_heap.cc", |
| "base/containers/linked_list.cc", |
| "base/cpu.cc", |
| "base/cpu_reduction_experiment.cc", |
| "base/debug/alias.cc", |
| "base/debug/crash_logging.cc", |
| "base/debug/debugger.cc", |
| "base/debug/debugger_posix.cc", |
| "base/debug/dump_without_crashing.cc", |
| "base/debug/elf_reader.cc", |
| "base/debug/stack_trace.cc", |
| "base/debug/stack_trace_posix.cc", |
| "base/debug/task_trace.cc", |
| "base/environment.cc", |
| "base/feature_list.cc", |
| "base/features.cc", |
| "base/file_descriptor_posix.cc", |
| "base/files/file.cc", |
| "base/files/file_descriptor_watcher_posix.cc", |
| "base/files/file_enumerator.cc", |
| "base/files/file_enumerator_posix.cc", |
| "base/files/file_path.cc", |
| "base/files/file_path_watcher.cc", |
| "base/files/file_path_watcher_inotify.cc", |
| "base/files/file_posix.cc", |
| "base/files/file_tracing.cc", |
| "base/files/file_util.cc", |
| "base/files/file_util_posix.cc", |
| "base/files/important_file_writer.cc", |
| "base/files/important_file_writer_cleaner.cc", |
| "base/files/memory_mapped_file.cc", |
| "base/files/memory_mapped_file_posix.cc", |
| "base/files/scoped_file.cc", |
| "base/files/scoped_file_linux.cc", |
| "base/files/scoped_temp_dir.cc", |
| "base/functional/callback_helpers.cc", |
| "base/functional/callback_internal.cc", |
| "base/hash/hash.cc", |
| "base/hash/md5_nacl.cc", |
| "base/hash/sha1_nacl.cc", |
| "base/json/json_file_value_serializer.cc", |
| "base/json/json_parser.cc", |
| "base/json/json_reader.cc", |
| "base/json/json_string_value_serializer.cc", |
| "base/json/json_value_converter.cc", |
| "base/json/json_writer.cc", |
| "base/json/string_escape.cc", |
| "base/json/values_util.cc", |
| "base/lazy_instance_helpers.cc", |
| "base/location.cc", |
| "base/logging.cc", |
| "base/logging_chromeos.cc", |
| "base/memory/aligned_memory.cc", |
| "base/memory/memory_pressure_listener.cc", |
| "base/memory/nonscannable_memory.cc", |
| "base/memory/page_size_posix.cc", |
| "base/memory/platform_shared_memory_handle.cc", |
| "base/memory/platform_shared_memory_mapper_posix.cc", |
| "base/memory/platform_shared_memory_region.cc", |
| "base/memory/platform_shared_memory_region_posix.cc", |
| "base/memory/read_only_shared_memory_region.cc", |
| "base/memory/ref_counted.cc", |
| "base/memory/ref_counted_memory.cc", |
| "base/memory/shared_memory_mapper.cc", |
| "base/memory/shared_memory_mapping.cc", |
| "base/memory/shared_memory_security_policy.cc", |
| "base/memory/shared_memory_tracker.cc", |
| "base/memory/unsafe_shared_memory_region.cc", |
| "base/memory/weak_ptr.cc", |
| "base/memory/writable_shared_memory_region.cc", |
| "base/message_loop/message_pump.cc", |
| "base/message_loop/message_pump_default.cc", |
| "base/message_loop/message_pump_epoll.cc", |
| "base/message_loop/message_pump_glib.cc", |
| "base/message_loop/message_pump_libevent.cc", |
| "base/message_loop/watchable_io_message_pump_posix.cc", |
| "base/message_loop/work_id_provider.cc", |
| "base/metrics/bucket_ranges.cc", |
| "base/metrics/crc32.cc", |
| "base/metrics/dummy_histogram.cc", |
| "base/metrics/field_trial.cc", |
| "base/metrics/field_trial_param_associator.cc", |
| "base/metrics/field_trial_params.cc", |
| "base/metrics/histogram.cc", |
| "base/metrics/histogram_base.cc", |
| "base/metrics/histogram_functions.cc", |
| "base/metrics/histogram_samples.cc", |
| "base/metrics/histogram_snapshot_manager.cc", |
| "base/metrics/metrics_hashes.cc", |
| "base/metrics/persistent_histogram_allocator.cc", |
| "base/metrics/persistent_memory_allocator.cc", |
| "base/metrics/persistent_sample_map.cc", |
| "base/metrics/ranges_manager.cc", |
| "base/metrics/sample_map.cc", |
| "base/metrics/sample_vector.cc", |
| "base/metrics/sparse_histogram.cc", |
| "base/metrics/statistics_recorder.cc", |
| "base/native_library.cc", |
| "base/native_library_posix.cc", |
| "base/observer_list_internal.cc", |
| "base/observer_list_threadsafe.cc", |
| "base/observer_list_types.cc", |
| "base/pending_task.cc", |
| "base/pickle.cc", |
| "base/posix/can_lower_nice_to.cc", |
| "base/posix/file_descriptor_shuffle.cc", |
| "base/posix/global_descriptors.cc", |
| "base/posix/safe_strerror.cc", |
| "base/posix/unix_domain_socket.cc", |
| "base/power_monitor/power_monitor.cc", |
| "base/power_monitor/power_monitor_device_source.cc", |
| "base/power_monitor/power_monitor_device_source_chromeos.cc", |
| "base/power_monitor/power_monitor_source.cc", |
| "base/process/current_process.cc", |
| "base/process/environment_internal.cc", |
| "base/process/internal_linux.cc", |
| "base/process/kill.cc", |
| "base/process/kill_posix.cc", |
| "base/process/launch.cc", |
| "base/process/launch_posix.cc", |
| "base/process/memory.cc", |
| "base/process/memory_linux.cc", |
| "base/process/process_handle.cc", |
| "base/process/process_handle_linux.cc", |
| "base/process/process_handle_posix.cc", |
| "base/process/process_iterator.cc", |
| "base/process/process_iterator_linux.cc", |
| "base/process/process_linux.cc", |
| "base/process/process_metrics.cc", |
| "base/process/process_metrics_linux.cc", |
| "base/process/process_metrics_posix.cc", |
| "base/process/process_posix.cc", |
| "base/profiler/frame.cc", |
| "base/profiler/metadata_recorder.cc", |
| "base/profiler/module_cache.cc", |
| "base/profiler/module_cache_posix.cc", |
| "base/profiler/sample_metadata.cc", |
| "base/profiler/stack_buffer.cc", |
| "base/profiler/stack_copier.cc", |
| "base/profiler/stack_sampler.cc", |
| "base/profiler/stack_sampler_posix.cc", |
| "base/profiler/stack_sampling_profiler.cc", |
| "base/profiler/unwinder.cc", |
| "base/rand_util.cc", |
| "base/rand_util_posix.cc", |
| "base/run_loop.cc", |
| "base/scoped_native_library.cc", |
| "base/sequence_checker.cc", |
| "base/sequence_checker_impl.cc", |
| "base/sequence_token.cc", |
| "base/strings/escape.cc", |
| "base/strings/pattern.cc", |
| "base/strings/safe_sprintf.cc", |
| "base/strings/strcat.cc", |
| "base/strings/string_number_conversions.cc", |
| "base/strings/string_split.cc", |
| "base/strings/string_util.cc", |
| "base/strings/string_util_constants.cc", |
| "base/strings/stringprintf.cc", |
| "base/strings/sys_string_conversions_posix.cc", |
| "base/strings/utf_offset_string_conversions.cc", |
| "base/strings/utf_string_conversion_utils.cc", |
| "base/strings/utf_string_conversions.cc", |
| "base/strings/utf_ostream_operators.cc", |
| "base/sync_socket.cc", |
| "base/sync_socket_posix.cc", |
| "base/synchronization/atomic_flag.cc", |
| "base/synchronization/condition_variable_posix.cc", |
| "base/synchronization/lock.cc", |
| "base/synchronization/lock_impl_posix.cc", |
| "base/synchronization/waitable_event.cc", |
| "base/synchronization/waitable_event_posix.cc", |
| "base/synchronization/waitable_event_watcher_posix.cc", |
| "base/system/sys_info.cc", |
| "base/system/sys_info_chromeos.cc", |
| "base/system/sys_info_linux.cc", |
| "base/system/sys_info_posix.cc", |
| "base/task/cancelable_task_tracker.cc", |
| "base/task/common/checked_lock_impl.cc", |
| "base/task/common/lazy_now.cc", |
| "base/task/common/operations_controller.cc", |
| "base/task/common/scoped_defer_task_posting.cc", |
| "base/task/common/task_annotator.cc", |
| "base/task/current_thread.cc", |
| "base/task/default_delayed_task_handle_delegate.cc", |
| "base/task/delayed_task_handle.cc", |
| "base/task/lazy_thread_pool_task_runner.cc", |
| "base/task/post_job.cc", |
| "base/task/scoped_set_task_priority_for_current_thread.cc", |
| "base/task/sequence_manager/associated_thread_id.cc", |
| "base/task/sequence_manager/atomic_flag_set.cc", |
| "base/task/sequence_manager/delayed_task_handle_delegate.cc", |
| "base/task/sequence_manager/enqueue_order_generator.cc", |
| "base/task/sequence_manager/fence.cc", |
| "base/task/sequence_manager/sequence_manager.cc", |
| "base/task/sequence_manager/sequence_manager_impl.cc", |
| "base/task/sequence_manager/sequenced_task_source.cc", |
| "base/task/sequence_manager/task_order.cc", |
| "base/task/sequence_manager/task_queue.cc", |
| "base/task/sequence_manager/task_queue_impl.cc", |
| "base/task/sequence_manager/task_queue_selector.cc", |
| "base/task/sequence_manager/tasks.cc", |
| "base/task/sequence_manager/thread_controller.cc", |
| "base/task/sequence_manager/thread_controller_impl.cc", |
| "base/task/sequence_manager/thread_controller_power_monitor.cc", |
| "base/task/sequence_manager/thread_controller_with_message_pump_impl.cc", |
| "base/task/sequence_manager/time_domain.cc", |
| "base/task/sequence_manager/wake_up_queue.cc", |
| "base/task/sequence_manager/work_deduplicator.cc", |
| "base/task/sequence_manager/work_queue.cc", |
| "base/task/sequence_manager/work_queue_sets.cc", |
| "base/task/sequenced_task_runner.cc", |
| "base/task/single_thread_task_executor.cc", |
| "base/task/single_thread_task_runner.cc", |
| "base/task/task_features.cc", |
| "base/task/task_runner.cc", |
| "base/task/task_traits.cc", |
| "base/task/thread_pool.cc", |
| "base/task/thread_pool/delayed_task_manager.cc", |
| "base/task/thread_pool/environment_config.cc", |
| "base/task/thread_pool/job_task_source.cc", |
| "base/task/thread_pool/pooled_parallel_task_runner.cc", |
| "base/task/thread_pool/pooled_sequenced_task_runner.cc", |
| "base/task/thread_pool/pooled_single_thread_task_runner_manager.cc", |
| "base/task/thread_pool/pooled_task_runner_delegate.cc", |
| "base/task/thread_pool/priority_queue.cc", |
| "base/task/thread_pool/sequence.cc", |
| "base/task/thread_pool/service_thread.cc", |
| "base/task/thread_pool/task.cc", |
| "base/task/thread_pool/task_source.cc", |
| "base/task/thread_pool/task_source_sort_key.cc", |
| "base/task/thread_pool/task_tracker.cc", |
| "base/task/thread_pool/thread_group.cc", |
| "base/task/thread_pool/thread_group_impl.cc", |
| "base/task/thread_pool/thread_pool_impl.cc", |
| "base/task/thread_pool/thread_pool_instance.cc", |
| "base/task/thread_pool/worker_thread.cc", |
| "base/task/thread_pool/worker_thread_set.cc", |
| "base/third_party/dynamic_annotations/dynamic_annotations.c", |
| "base/third_party/nspr/prtime.cc", |
| "base/threading/hang_watcher.cc", |
| "base/threading/platform_thread.cc", |
| "base/threading/platform_thread_internal_posix.cc", |
| "base/threading/platform_thread_linux.cc", |
| "base/threading/platform_thread_posix.cc", |
| "base/threading/platform_thread_ref.cc", |
| "base/threading/post_task_and_reply_impl.cc", |
| "base/threading/scoped_blocking_call.cc", |
| "base/threading/scoped_blocking_call_internal.cc", |
| "base/threading/sequence_local_storage_map.cc", |
| "base/threading/sequence_local_storage_slot.cc", |
| "base/threading/simple_thread.cc", |
| "base/threading/thread.cc", |
| "base/threading/thread_checker.cc", |
| "base/threading/thread_checker_impl.cc", |
| "base/threading/thread_collision_warner.cc", |
| "base/threading/thread_id_name_manager.cc", |
| "base/threading/thread_local_storage.cc", |
| "base/threading/thread_local_storage_posix.cc", |
| "base/threading/thread_restrictions.cc", |
| "base/threading/thread_type_delegate.cc", |
| "base/threading/watchdog.cc", |
| "base/time/clock.cc", |
| "base/time/default_clock.cc", |
| "base/time/default_tick_clock.cc", |
| "base/time/tick_clock.cc", |
| "base/time/time.cc", |
| "base/time/time_conversion_posix.cc", |
| "base/time/time_delta_from_string.cc", |
| "base/time/time_exploded_posix.cc", |
| "base/time/time_now_posix.cc", |
| "base/time/time_override.cc", |
| "base/timer/elapsed_timer.cc", |
| "base/timer/lap_timer.cc", |
| "base/timer/timer.cc", |
| "base/timer/wall_clock_timer.cc", |
| "base/token.cc", |
| "base/trace_event/category_registry.cc", |
| "base/trace_event/heap_profiler_allocation_context_tracker.cc", |
| "base/trace_event/interned_args_helper.cc", |
| "base/trace_event/malloc_dump_provider.cc", |
| "base/trace_event/memory_allocator_dump.cc", |
| "base/trace_event/memory_allocator_dump_guid.cc", |
| "base/trace_event/memory_dump_manager.cc", |
| "base/trace_event/memory_dump_provider_info.cc", |
| "base/trace_event/memory_dump_request_args.cc", |
| "base/trace_event/memory_dump_scheduler.cc", |
| "base/trace_event/memory_infra_background_allowlist.cc", |
| "base/trace_event/memory_usage_estimator.cc", |
| "base/trace_event/process_memory_dump.cc", |
| "base/trace_event/trace_arguments.cc", |
| "base/trace_event/trace_buffer.cc", |
| "base/trace_event/trace_config.cc", |
| "base/trace_event/trace_config_category_filter.cc", |
| "base/trace_event/trace_event_impl.cc", |
| "base/trace_event/trace_event_memory_overhead.cc", |
| "base/trace_event/trace_id_helper.cc", |
| "base/trace_event/trace_log.cc", |
| "base/trace_event/trace_log_constants.cc", |
| "base/trace_event/traced_value.cc", |
| "base/trace_event/typed_macros_internal.cc", |
| "base/unguessable_token.cc", |
| "base/uuid.cc", |
| "base/value_iterators.cc", |
| "base/values.cc", |
| "base/version.cc", |
| "base/vlog.cc", |
| ] |
| |
| # Enable //base/allocator shim for non-sanitizer builds. |
| if (!(use.asan || use.fuzzer || use.msan || use.ubsan)) { |
| sources += [ |
| "base/allocator/allocator_extension.cc", |
| "base/allocator/partition_allocator/shim/allocator_shim.cc", |
| "base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_glibc.cc", |
| ] |
| } |
| }, |
| |
| { |
| name = "base-policy" |
| deps = [ ":base-core" ] |
| libs = [ "re2" ] |
| configs = [ ":policy_export_config" ] |
| sources = [ |
| "components/policy/core/common/json_schema_constants.cc", |
| "components/policy/core/common/registry_dict.cc", |
| "components/policy/core/common/schema.cc", |
| ] |
| }, |
| |
| { |
| name = "base-base_test_support" |
| testonly = true |
| sources = [ |
| "base/test/metrics/histogram_tester.cc", |
| "base/test/mock_entropy_provider.cc", |
| "base/test/mock_log.cc", |
| "base/test/power_monitor_test.cc", |
| "base/test/scoped_chromeos_version_info.cc", |
| "base/test/scoped_command_line.cc", |
| "base/test/scoped_feature_list.cc", |
| "base/test/scoped_run_loop_timeout.cc", |
| "base/test/simple_test_clock.cc", |
| "base/test/simple_test_tick_clock.cc", |
| "base/test/task_environment.cc", |
| "base/test/test_file_util.cc", |
| "base/test/test_file_util_linux.cc", |
| "base/test/test_file_util_posix.cc", |
| "base/test/test_mock_time_task_runner.cc", |
| "base/test/test_pending_task.cc", |
| "base/test/test_simple_task_runner.cc", |
| "base/test/test_switches.cc", |
| "base/test/test_timeouts.cc", |
| "base/timer/mock_timer.cc", |
| ] |
| }, |
| ] |
| |
| if (use.crypto) { |
| libbase_sublibs += [ |
| { |
| name = "base-crypto" |
| deps = [ ":base-core" ] |
| libs = [ |
| "dl", |
| "pthread", |
| ] |
| pkg_deps = [ |
| "nss", |
| "openssl", |
| ] |
| configs = [ ":crypto_export_config" ] |
| sources = [ |
| "crypto/hmac.cc", |
| "crypto/hmac_nss.cc", |
| |
| # Added to libchrome only (not upstream) to support OpenSSL 1.1 API |
| "crypto/libcrypto-compat.c", |
| "crypto/nss_key_util.cc", |
| "crypto/nss_util.cc", |
| "crypto/openssl_util.cc", |
| "crypto/random.cc", |
| "crypto/rsa_private_key.cc", |
| "crypto/rsa_private_key_nss.cc", |
| "crypto/scoped_test_nss_db.cc", |
| "crypto/secure_hash.cc", |
| "crypto/secure_util.cc", |
| "crypto/sha2.cc", |
| "crypto/signature_creator_nss.cc", |
| "crypto/signature_verifier_nss.cc", |
| "crypto/symmetric_key_nss.cc", |
| "crypto/third_party/nss/rsawrapr.c", |
| "crypto/third_party/nss/sha512.cc", |
| ] |
| }, |
| ] |
| } |
| |
| if (use.dbus) { |
| libbase_sublibs += [ |
| { |
| name = "base-dbus" |
| deps = [ ":base-core" ] |
| pkg_deps = [ |
| "absl", |
| "dbus-1", |
| ] |
| if (use.fuzzer) { |
| pkg_deps += [ "protobuf" ] |
| } else { |
| pkg_deps += [ "protobuf-lite" ] |
| } |
| configs = [ ":dbus_export_config" ] |
| sources = [ |
| "dbus/bus.cc", |
| "dbus/dbus_statistics.cc", |
| "dbus/error.cc", |
| "dbus/exported_object.cc", |
| "dbus/message.cc", |
| "dbus/object_manager.cc", |
| "dbus/object_path.cc", |
| "dbus/object_proxy.cc", |
| "dbus/property.cc", |
| "dbus/scoped_dbus_error.cc", |
| "dbus/string_util.cc", |
| "dbus/util.cc", |
| "dbus/values_util.cc", |
| ] |
| }, |
| |
| { |
| name = "base-dbus_test_support" |
| testonly = true |
| pkg_deps = [ "dbus-1" ] |
| if (use.fuzzer) { |
| pkg_deps += [ "protobuf" ] |
| } else { |
| pkg_deps += [ "protobuf-lite" ] |
| } |
| sources = [ |
| "dbus/mock_bus.cc", |
| "dbus/mock_exported_object.cc", |
| "dbus/mock_object_manager.cc", |
| "dbus/mock_object_proxy.cc", |
| ] |
| }, |
| ] |
| } |
| |
| # Generate static/shared libraries. |
| foreach(attr, libbase_sublibs) { |
| if (defined(attr.pkg_deps)) { |
| # If it depends on external packages, introduces -pkg-config config. |
| pkg_config(attr.name + "-pkg-config") { |
| pkg_deps = attr.pkg_deps |
| } |
| } |
| |
| if (defined(attr.testonly) && attr.testonly) { |
| buildtype = "static_library" |
| } else { |
| buildtype = "shared_library" |
| } |
| target(buildtype, attr.name) { |
| sources = attr.sources |
| deps = [ ":all_buildflags" ] |
| if (defined(attr.deps)) { |
| deps += attr.deps |
| } |
| |
| if (defined(attr.libs)) { |
| libs = attr.libs |
| } |
| |
| if (defined(attr.pkg_deps)) { |
| configs += [ ":" + attr.name + "-pkg-config" ] |
| } |
| configs += [ ":libchrome_config" ] |
| if (buildtype == "static_library") { |
| configs -= [ "//common-mk:use_thin_archive" ] |
| configs += [ "//common-mk:nouse_thin_archive" ] |
| } |
| if (defined(attr.configs)) { |
| configs += attr.configs |
| } |
| } |
| } |
| |
| action("base") { |
| deps = [] |
| foreach(attr, libbase_sublibs) { |
| if (!defined(attr.testonly) || !attr.testonly) { |
| deps += [ ":" + attr.name ] |
| } |
| } |
| |
| script = "//common-mk/write_args.py" |
| outputs = [ "${root_out_dir}/lib/lib${target_name}.so" ] |
| args = [ "--output" ] + outputs + [ "--" ] + [ |
| "GROUP", |
| "(", |
| "AS_NEEDED", |
| "(", |
| ] |
| foreach(attr, libbase_sublibs) { |
| if (!defined(attr.testonly) || !attr.testonly) { |
| args += [ "-l" + attr.name ] |
| } |
| } |
| args += [ |
| ")", |
| ")", |
| ] |
| } |
| |
| libchrome_exported_cflags = [ |
| "-I/usr/include/libchrome", |
| "-Wno-unused-local-typedefs", |
| "-DBASE_VER=${libchrome_basever}", |
| ] |
| |
| if (use.asan) { |
| libchrome_exported_cflags += [ |
| "-DLEAK_SANITIZER", |
| "-DDISABLE_ALLOCATOR_SANITIZER", |
| ] |
| } |
| |
| generate_pkg_config("libchrome") { |
| deps = [ ":base" ] |
| description = "chrome base library" |
| version = "${libchrome_basever}" |
| requires_private = [] |
| foreach(attr, libbase_sublibs) { |
| if ((!defined(attr.testonly) || !attr.testonly) && defined(attr.pkg_deps)) { |
| requires_private += attr.pkg_deps |
| } |
| } |
| |
| # base/synchronization/lock_impl.h has function inlined that uses pthread. |
| libs = [ |
| "-lbase", |
| "-lpthread", |
| ] |
| libs_private = [] |
| foreach(attr, libbase_sublibs) { |
| if (!defined(attr.testonly) || !attr.testonly) { |
| libs_private += [ "-l" + attr.name ] |
| if (defined(attr.libs)) { |
| foreach(lib, attr.libs) { |
| libs_private += [ "-l" + lib ] |
| } |
| } |
| } |
| } |
| cflags = libchrome_exported_cflags |
| } |
| |
| action("base-test") { |
| deps = [] |
| foreach(attr, libbase_sublibs) { |
| if (defined(attr.testonly) && attr.testonly) { |
| deps += [ ":" + attr.name ] |
| } |
| } |
| |
| script = "//common-mk/write_args.py" |
| outputs = [ "${root_out_dir}/lib${target_name}.a" ] |
| args = [ "--output" ] + outputs + [ "--" ] + [ |
| "GROUP", |
| "(", |
| "AS_NEEDED", |
| "(", |
| ] |
| foreach(attr, libbase_sublibs) { |
| if (defined(attr.testonly) && attr.testonly) { |
| args += [ "-l" + attr.name ] |
| } |
| } |
| args += [ |
| ")", |
| ")", |
| ] |
| } |
| |
| generate_pkg_config("libchrome-test") { |
| deps = [ ":base-test" ] |
| description = "chrome base test library" |
| version = "${libchrome_basever}" |
| requires_private = [] |
| foreach(attr, libbase_sublibs) { |
| if (defined(attr.testonly) && attr.testonly && defined(attr.pkg_deps)) { |
| requires_private += attr.pkg_deps |
| } |
| } |
| libs = [ "-lbase-test" ] |
| libs_private = [] |
| foreach(attr, libbase_sublibs) { |
| if (defined(attr.testonly) && attr.testonly) { |
| libs_private += [ "-l" + attr.name ] |
| if (defined(attr.libs)) { |
| libs_private += [ "-l" + lib ] |
| } |
| } |
| } |
| cflags = libchrome_exported_cflags |
| } |
| |
| if (use.mojo) { |
| generate_mojom_type_mappings("mojom_type_mappings") { |
| mojom_type_mappings_generator = |
| "libchrome_tools/mojom_generate_type_mappings.py" |
| sources = [ |
| "mojo/public/cpp/base/file.typemap", |
| "mojo/public/cpp/base/file_error.typemap", |
| "mojo/public/cpp/base/file_info.typemap", |
| "mojo/public/cpp/base/file_path.typemap", |
| "mojo/public/cpp/base/memory_allocator_dump_cross_process_uid.typemap", |
| "mojo/public/cpp/base/process_id.typemap", |
| "mojo/public/cpp/base/read_only_buffer.typemap", |
| "mojo/public/cpp/base/shared_memory.typemap", |
| "mojo/public/cpp/base/text_direction.typemap", |
| "mojo/public/cpp/base/thread_priority.typemap", |
| "mojo/public/cpp/base/time.typemap", |
| "mojo/public/cpp/base/unguessable_token.typemap", |
| "mojo/public/cpp/base/values.typemap", |
| ] |
| } |
| generate_mojom_bindings_gen("mojom_bindings_gen") { |
| mojom_bindings_generator = |
| "mojo/public/tools/bindings/mojom_bindings_generator.py" |
| mojom_parser = "mojo/public/tools/mojom/mojom_parser.py" |
| |
| # TODO(fqj): revisit typemaps after uprev. |
| # typemaps = get_target_outputs(":mojom_type_mappings") |
| sources = [ |
| "ipc/ipc.mojom", |
| |
| # TODO(fqj): Revisit these 3 files after uprev. |
| "mojo/public/interfaces/bindings/interface_control_messages.mojom", |
| "mojo/public/interfaces/bindings/native_struct.mojom", |
| "mojo/public/interfaces/bindings/pipe_control_messages.mojom", |
| "mojo/public/mojom/base/file.mojom", |
| "mojo/public/mojom/base/file_error.mojom", |
| "mojo/public/mojom/base/file_info.mojom", |
| "mojo/public/mojom/base/file_path.mojom", |
| "mojo/public/mojom/base/generic_pending_associated_receiver.mojom", |
| "mojo/public/mojom/base/generic_pending_receiver.mojom", |
| "mojo/public/mojom/base/memory_allocator_dump_cross_process_uid.mojom", |
| "mojo/public/mojom/base/process_id.mojom", |
| "mojo/public/mojom/base/read_only_buffer.mojom", |
| "mojo/public/mojom/base/shared_memory.mojom", |
| "mojo/public/mojom/base/text_direction.mojom", |
| "mojo/public/mojom/base/thread_type.mojom", |
| "mojo/public/mojom/base/time.mojom", |
| "mojo/public/mojom/base/unguessable_token.mojom", |
| "mojo/public/mojom/base/values.mojom", |
| "ui/gfx/geometry/mojom/geometry.mojom", |
| "ui/gfx/range/mojom/range.mojom", |
| ] |
| } |
| |
| # TODO(fqj): Revisit these 3 files after uprev. |
| # generate_mojom_bindings_gen("mojom_bindings_native_gen") { |
| # mojom_bindings_generator = |
| # "mojo/public/tools/bindings/mojom_bindings_generator.py" |
| # mojom_parser = "mojo/public/tools/mojom/mojom_parser.py" |
| # sources = [ |
| # ] |
| # disallow_native_types = true |
| # disallow_interfaces = true |
| # } |
| |
| # Probably we should consider build libmojo as a part of libchrome. |
| # crbug.com/924035. |
| shared_library("mojo") { |
| deps = [ |
| ":all_buildflags", |
| ":base-core", |
| ":base-crypto", |
| ":mojom_bindings_gen", |
| ":mojom_bindings_gen", |
| |
| # ":mojom_bindings_native_gen", |
| # ":mojom_type_mappings", |
| ] |
| libs = [ "pthread" ] |
| |
| # TODO(hidehiko): Consolidate with build_config.h. |
| configs += [ |
| ":libchrome_config", |
| ":mojo_export_config", |
| "//common-mk:visibility_default", |
| ] |
| sources = |
| [ |
| "ipc/ipc_message.cc", |
| "ipc/ipc_message_attachment_set.cc", |
| "ipc/native_handle_type_converters.cc", |
| "mojo/core/atomic_flag.cc", |
| "mojo/core/broker_host.cc", |
| "mojo/core/broker_posix.cc", |
| "mojo/core/channel.cc", |
| "mojo/core/channel_linux.cc", |
| "mojo/core/channel_posix.cc", |
| "mojo/core/configuration.cc", |
| "mojo/core/connection_params.cc", |
| "mojo/core/core.cc", |
| "mojo/core/core_ipcz.cc", |
| "mojo/core/data_pipe_consumer_dispatcher.cc", |
| "mojo/core/data_pipe_control_message.cc", |
| "mojo/core/data_pipe_producer_dispatcher.cc", |
| "mojo/core/dispatcher.cc", |
| "mojo/core/embedder/embedder.cc", |
| "mojo/core/embedder/features.cc", |
| "mojo/core/embedder/scoped_ipc_support.cc", |
| "mojo/core/entrypoints.cc", |
| "mojo/core/handle_table.cc", |
| "mojo/core/invitation_dispatcher.cc", |
| "mojo/core/ipcz_api.cc", |
| "mojo/core/ipcz_driver/base_shared_memory_service.cc", |
| "mojo/core/ipcz_driver/data_pipe.cc", |
| "mojo/core/ipcz_driver/driver.cc", |
| "mojo/core/ipcz_driver/invitation.cc", |
| "mojo/core/ipcz_driver/mojo_message.cc", |
| "mojo/core/ipcz_driver/mojo_trap.cc", |
| "mojo/core/ipcz_driver/object.cc", |
| "mojo/core/ipcz_driver/ring_buffer.cc", |
| "mojo/core/ipcz_driver/shared_buffer.cc", |
| "mojo/core/ipcz_driver/shared_buffer_mapping.cc", |
| "mojo/core/ipcz_driver/transmissible_platform_handle.cc", |
| "mojo/core/ipcz_driver/transport.cc", |
| "mojo/core/ipcz_driver/wrapped_platform_handle.cc", |
| "mojo/core/message_pipe_dispatcher.cc", |
| "mojo/core/mojo_core.cc", |
| "mojo/core/node_channel.cc", |
| "mojo/core/node_controller.cc", |
| "mojo/core/platform_handle_dispatcher.cc", |
| "mojo/core/platform_handle_in_transit.cc", |
| "mojo/core/platform_handle_utils.cc", |
| "mojo/core/platform_shared_memory_mapping.cc", |
| "mojo/core/ports/event.cc", |
| "mojo/core/ports/message_queue.cc", |
| "mojo/core/ports/name.cc", |
| "mojo/core/ports/node.cc", |
| "mojo/core/ports/port.cc", |
| "mojo/core/ports/port_locker.cc", |
| "mojo/core/ports/port_ref.cc", |
| "mojo/core/ports/user_message.cc", |
| "mojo/core/request_context.cc", |
| "mojo/core/scoped_ipcz_handle.cc", |
| "mojo/core/shared_buffer_dispatcher.cc", |
| "mojo/core/user_message_impl.cc", |
| "mojo/core/watch.cc", |
| "mojo/core/watcher_dispatcher.cc", |
| "mojo/core/watcher_set.cc", |
| "mojo/public/c/system/thunks.cc", |
| "mojo/public/cpp/bindings/async_flusher.cc", |
| "mojo/public/cpp/bindings/connection_group.cc", |
| "mojo/public/cpp/bindings/features.cc", |
| "mojo/public/cpp/bindings/lib/array_internal.cc", |
| "mojo/public/cpp/bindings/lib/associated_group.cc", |
| "mojo/public/cpp/bindings/lib/associated_group_controller.cc", |
| "mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc", |
| "mojo/public/cpp/bindings/lib/associated_receiver.cc", |
| "mojo/public/cpp/bindings/lib/binding_state.cc", |
| "mojo/public/cpp/bindings/lib/buffer.cc", |
| "mojo/public/cpp/bindings/lib/connector.cc", |
| "mojo/public/cpp/bindings/lib/control_message_handler.cc", |
| "mojo/public/cpp/bindings/lib/control_message_proxy.cc", |
| "mojo/public/cpp/bindings/lib/generated_code_util.cc", |
| "mojo/public/cpp/bindings/lib/handle_serialization.cc", |
| "mojo/public/cpp/bindings/lib/interface_endpoint_client.cc", |
| "mojo/public/cpp/bindings/lib/interface_ptr_state.cc", |
| "mojo/public/cpp/bindings/lib/message.cc", |
| "mojo/public/cpp/bindings/lib/message_dispatcher.cc", |
| "mojo/public/cpp/bindings/lib/message_header_validator.cc", |
| "mojo/public/cpp/bindings/lib/message_internal.cc", |
| "mojo/public/cpp/bindings/lib/multiplex_router.cc", |
| "mojo/public/cpp/bindings/lib/pending_receiver_state.cc", |
| "mojo/public/cpp/bindings/lib/pending_remote_state.cc", |
| "mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc", |
| "mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc", |
| "mojo/public/cpp/bindings/lib/proxy_to_responder.cc", |
| "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc", |
| "mojo/public/cpp/bindings/lib/send_message_helper.cc", |
| "mojo/public/cpp/bindings/lib/sequence_local_sync_event_watcher.cc", |
| "mojo/public/cpp/bindings/lib/sync_call_restrictions.cc", |
| "mojo/public/cpp/bindings/lib/sync_event_watcher.cc", |
| "mojo/public/cpp/bindings/lib/sync_handle_registry.cc", |
| "mojo/public/cpp/bindings/lib/sync_handle_watcher.cc", |
| "mojo/public/cpp/bindings/lib/task_runner_helper.cc", |
| "mojo/public/cpp/bindings/lib/thread_safe_forwarder_base.cc", |
| "mojo/public/cpp/bindings/lib/validation_context.cc", |
| "mojo/public/cpp/bindings/lib/validation_errors.cc", |
| "mojo/public/cpp/bindings/lib/validation_util.cc", |
| "mojo/public/cpp/bindings/pending_flush.cc", |
| "mojo/public/cpp/bindings/receiver_set.cc", |
| "mojo/public/cpp/platform/platform_channel.cc", |
| "mojo/public/cpp/platform/platform_channel_endpoint.cc", |
| "mojo/public/cpp/platform/platform_channel_server.cc", |
| "mojo/public/cpp/platform/platform_channel_server_endpoint.cc", |
| "mojo/public/cpp/platform/platform_channel_server_posix.cc", |
| "mojo/public/cpp/platform/platform_handle.cc", |
| "mojo/public/cpp/platform/socket_utils_posix.cc", |
| "mojo/public/cpp/system/handle_signal_tracker.cc", |
| "mojo/public/cpp/system/invitation.cc", |
| "mojo/public/cpp/system/isolated_connection.cc", |
| "mojo/public/cpp/system/platform_handle.cc", |
| "mojo/public/cpp/system/simple_watcher.cc", |
| "mojo/public/cpp/system/trap.cc", |
| "mojo/public/cpp/system/wait.cc", |
| "mojo/public/cpp/system/wait_set.cc", |
| ] + get_target_outputs(":mojom_bindings_gen") # + |
| |
| #get_target_outputs(":mojom_bindings_native_gen") |
| |
| if (use.asan || use.fuzzer || use.msan || use.ubsan) { |
| sources += [ |
| "ipc/ipc_message_attachment.cc", |
| "ipc/ipc_mojo_handle_attachment.cc", |
| "ipc/ipc_platform_file_attachment_posix.cc", |
| ] |
| } |
| } |
| |
| generate_pkg_config("libmojo") { |
| deps = [ ":mojo" ] |
| description = "Chrome Mojo IPC library" |
| version = "${libchrome_basever}" |
| libs = [ "-lmojo" ] |
| cflags = [ |
| "-I/usr/include/libchrome", |
| "-Wno-cast-qual", |
| "-Wno-cast-align", |
| ] |
| } |
| } |
| |
| if (use.test) { |
| executable("optional_unittests") { |
| sources = [ |
| "base/test/gtest_util.cc", |
| "base/test/values_test_util.cc", |
| "base/types/optional_unittest.cc", |
| ] |
| configs += [ |
| "//common-mk:test", |
| ":libchrome_config", |
| ] |
| libs = [ "gtest_main" ] |
| deps = [ |
| ":base-core", |
| "//common-mk/testrunner:testrunner", |
| ] |
| } |
| } |
| |
| install_config("install_basever") { |
| sources = [ "BASE_VER" ] |
| install_path = "/usr/share/libchrome" |
| } |
| |
| install_config("install_header") { |
| sources = [] |
| sources += [ "base/tracing/protos/chrome_track_event.pbzero.h" ] |
| sources += [ |
| "base/*.h", |
| "base/allocator/*.h", |
| "base/allocator/partition_allocator/*.h", |
| "base/allocator/partition_allocator/partition_alloc_base/*.h", |
| "base/allocator/partition_allocator/partition_alloc_base/augmentations/*.h", |
| "base/allocator/partition_allocator/pointers/*.h", |
| "base/allocator/partition_allocator/starscan/*.h", |
| "base/containers/*.h", |
| "base/debug/*.h", |
| "base/files/*.h", |
| "base/functional/*.h", |
| "base/hash/*.h", |
| "base/i18n/*.h", |
| "base/json/*.h", |
| "base/memory/*.h", |
| "base/message_loop/*.h", |
| "base/metrics/*.h", |
| "base/numerics/*.h", |
| "base/posix/*.h", |
| "base/power_monitor/*.h", |
| "base/process/*.h", |
| "base/profiler/*.h", |
| "base/ranges/*.h", |
| "base/strings/*.h", |
| "base/synchronization/*.h", |
| "base/system/*.h", |
| "base/task/*.h", |
| "base/task/common/*.h", |
| "base/task/sequence_manager/*.h", |
| "base/task/thread_pool/*.h", |
| "base/third_party/icu/*.h", |
| "base/third_party/nspr/*.h", |
| "base/third_party/valgrind/*.h", |
| "base/threading/*.h", |
| "base/time/*.h", |
| "base/timer/*.h", |
| "base/trace_event/*.h", |
| "base/trace_event/common/*.h", |
| "base/types/*.h", |
| "build/*.h", |
| "components/policy/*.h", |
| "components/policy/core/common/*.h", |
| "testing/gmock/include/gmock/*.h", |
| "testing/gtest/include/gtest/*.h", |
| ] |
| if (use.dbus) { |
| sources += [ "dbus/*.h" ] |
| } |
| if (use.mojo) { |
| sources += [ |
| "ipc/*.h", |
| "mojo/core/*.h", |
| "mojo/core/embedder/*.h", |
| "mojo/core/ports/*.h", |
| "mojo/public/c/system/*.h", |
| "mojo/public/cpp/base/*.h", |
| "mojo/public/cpp/bindings/*.h", |
| "mojo/public/cpp/bindings/lib/*.h", |
| "mojo/public/cpp/platform/*.h", |
| "mojo/public/cpp/system/*.h", |
| ] |
| } |
| sources += [ |
| "base/test/allow_check_is_test_to_be_called.h", |
| "base/test/bind.h", |
| "base/test/gmock_callback_support.h", |
| "base/test/metrics/histogram_tester.h", |
| "base/test/mock_callback.h", |
| "base/test/mock_log.h", |
| "base/test/power_monitor_test.h", |
| "base/test/repeating_test_future.h", |
| "base/test/scoped_chromeos_version_info.h", |
| "base/test/scoped_command_line.h", |
| "base/test/scoped_feature_list.h", |
| "base/test/scoped_logging_settings.h", |
| "base/test/scoped_run_loop_timeout.h", |
| "base/test/scoped_running_on_chromeos.h", |
| "base/test/simple_test_clock.h", |
| "base/test/simple_test_tick_clock.h", |
| "base/test/task_environment.h", |
| "base/test/test_file_util.h", |
| "base/test/test_future.h", |
| "base/test/test_future_internal.h", |
| "base/test/test_mock_time_task_runner.h", |
| "base/test/test_pending_task.h", |
| "base/test/test_switches.h", |
| "base/test/test_timeouts.h", |
| ] |
| sources += [ |
| "third_party/abseil-cpp/**/*.h", |
| "third_party/ipcz/**/*.h", |
| "third_party/libevent/*.h", |
| "third_party/perfetto/**/*.h", |
| ] |
| if (use.crypto) { |
| sources += [ |
| "crypto/crypto_export.h", |
| "crypto/hmac.h", |
| "crypto/libcrypto-compat.h", |
| "crypto/nss_key_util.h", |
| "crypto/nss_util.h", |
| "crypto/nss_util_internal.h", |
| "crypto/openssl_util.h", |
| "crypto/p224.h", |
| "crypto/p224_spake.h", |
| "crypto/random.h", |
| "crypto/rsa_private_key.h", |
| "crypto/scoped_nss_types.h", |
| "crypto/scoped_openssl_types.h", |
| "crypto/scoped_test_nss_db.h", |
| "crypto/secure_hash.h", |
| "crypto/secure_util.h", |
| "crypto/sha2.h", |
| "crypto/signature_creator.h", |
| "crypto/signature_verifier.h", |
| ] |
| } |
| install_path = "/usr/include/libchrome" |
| glob = true |
| tree_relative_to = "." |
| } |
| |
| install_config("install_mojom_generated") { |
| sources = [ |
| "${root_gen_dir}/include/mojo/public/interfaces/bindings/*.h", |
| "${root_gen_dir}/include/mojo/public/mojom/base/*.h", |
| ] |
| glob = true |
| tree_relative_to = "${root_gen_dir}/include" |
| install_path = "/usr/include/libchrome" |
| } |
| |
| install_config("install_buildflag_header") { |
| sources = [ |
| "${root_gen_dir}/libchrome/base/**/*buildflags.h", |
| "${root_gen_dir}/libchrome/build/**/*buildflags.h", |
| ] |
| if (use.mojo) { |
| sources += [ |
| "${root_gen_dir}/libchrome/ipc/**/*buildflags.h", |
| "${root_gen_dir}/libchrome/mojo/**/*buildflags.h", |
| ] |
| } |
| install_path = "/usr/include/libchrome" |
| glob = true |
| tree_relative_to = "${root_gen_dir}/libchrome" |
| } |