You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1552 lines
59 KiB

// Copyright (C) 2015 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.
// Common defaults
// ========================================================
// Using Chrome header files directly could cause -Wunused-parameter errors,
// and this is workaround. Please find the document in include_generator.py
// for details.
// Note: gensrcs does not support exclude_srcs, so filegroup rule is
// introduced.
package {
default_applicable_licenses: ["external_libchrome_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "external_libchrome_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-GPL-2.0",
"SPDX-license-identifier-LGPL-2.1",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-MPL",
"SPDX-license-identifier-Unicode-DFS",
"legacy_unencumbered",
],
license_text: [
"NOTICE",
],
}
filegroup {
name: "libchrome-include-sources",
srcs: [
"base/allocator/allocator_extension.h",
"base/allocator/allocator_shim.h",
"base/allocator/allocator_shim_internals.h",
"base/allocator/allocator_shim_override_cpp_symbols.h",
"base/allocator/allocator_shim_override_libc_symbols.h",
"base/allocator/allocator_shim_override_linker_wrapped_symbols.h",
"base/allocator/buildflags.h",
"base/android/android_hardware_buffer_compat.h",
"base/android/build_info.h",
"base/android/content_uri_utils.h",
"base/android/java_exception_reporter.h",
"base/android/jni_android.h",
"base/android/jni_array.h",
"base/android/jni_string.h",
"base/android/path_utils.h",
"base/android/scoped_hardware_buffer_handle.h",
"base/android/scoped_java_ref.h",
"base/android/sys_utils.h",
"base/at_exit.h",
"base/atomic_ref_count.h",
"base/atomic_sequence_num.h",
"base/atomicops.h",
"base/atomicops_internals_atomicword_compat.h",
"base/atomicops_internals_portable.h",
"base/atomicops_internals_x86_msvc.h",
"base/auto_reset.h",
"base/barrier_closure.h",
"base/base64.h",
"base/base64url.h",
"base/base_export.h",
"base/base_paths.h",
"base/base_paths_android.h",
"base/base_paths_posix.h",
"base/base_switches.h",
"base/big_endian.h",
"base/bind.h",
"base/bind_helpers.h",
"base/bind_internal.h",
"base/bit_cast.h",
"base/bits.h",
"base/build_time.h",
"base/callback.h",
"base/callback_forward.h",
"base/callback_helpers.h",
"base/callback_internal.h",
"base/callback_list.h",
"base/cancelable_callback.h",
"base/cfi_buildflags.h",
"base/command_line.h",
"base/compiler_specific.h",
"base/component_export.h",
"base/containers/adapters.h",
"base/containers/circular_deque.h",
"base/containers/flat_map.h",
"base/containers/flat_set.h",
"base/containers/flat_tree.h",
"base/containers/hash_tables.h",
"base/containers/linked_list.h",
"base/containers/mru_cache.h",
"base/containers/queue.h",
"base/containers/ring_buffer.h",
"base/containers/small_map.h",
"base/containers/span.h",
"base/containers/stack.h",
"base/containers/stack_container.h",
"base/containers/vector_buffer.h",
"base/cpu.h",
"base/critical_closure.h",
"base/debug/activity_tracker.h",
"base/debug/alias.h",
"base/debug/crash_logging.h",
"base/debug/debugger.h",
"base/debug/debugging_buildflags.h",
"base/debug/dump_without_crashing.h",
"base/debug/elf_reader_linux.h",
"base/debug/leak_annotations.h",
"base/debug/leak_tracker.h",
"base/debug/proc_maps_linux.h",
"base/debug/profiler.h",
"base/debug/stack_trace.h",
"base/debug/task_annotator.h",
"base/debug/thread_heap_usage_tracker.h",
"base/environment.h",
"base/export_template.h",
"base/feature_list.h",
"base/file_descriptor_posix.h",
"base/file_version_info.h",
"base/files/dir_reader_fallback.h",
"base/files/dir_reader_linux.h",
"base/files/dir_reader_posix.h",
"base/files/file.h",
"base/files/file_descriptor_watcher_posix.h",
"base/files/file_enumerator.h",
"base/files/file_path.h",
"base/files/file_path_watcher.h",
"base/files/file_tracing.h",
"base/files/file_util.h",
"base/files/important_file_writer.h",
"base/files/memory_mapped_file.h",
"base/files/platform_file.h",
"base/files/scoped_file.h",
"base/files/scoped_temp_dir.h",
"base/format_macros.h",
"base/gtest_prod_util.h",
"base/guid.h",
"base/hash.h",
"base/i18n/base_i18n_export.h",
"base/i18n/rtl.h",
"base/json/json_file_value_serializer.h",
"base/json/json_parser.h",
"base/json/json_reader.h",
"base/json/json_string_value_serializer.h",
"base/json/json_value_converter.h",
"base/json/json_writer.h",
"base/json/string_escape.h",
"base/lazy_instance.h",
"base/lazy_instance_helpers.h",
"base/location.h",
"base/logging.h",
"base/macros.h",
"base/md5.h",
"base/memory/aligned_memory.h",
"base/memory/free_deleter.h",
"base/memory/linked_ptr.h",
"base/memory/platform_shared_memory_region.h",
"base/memory/protected_memory.h",
"base/memory/protected_memory_buildflags.h",
"base/memory/protected_memory_cfi.h",
"base/memory/ptr_util.h",
"base/memory/raw_scoped_refptr_mismatch_checker.h",
"base/memory/read_only_shared_memory_region.h",
"base/memory/ref_counted.h",
"base/memory/ref_counted_delete_on_sequence.h",
"base/memory/ref_counted_memory.h",
"base/memory/scoped_policy.h",
"base/memory/scoped_refptr.h",
"base/memory/shared_memory.h",
"base/memory/shared_memory_handle.h",
"base/memory/shared_memory_helper.h",
"base/memory/shared_memory_mapping.h",
"base/memory/singleton.h",
"base/memory/unsafe_shared_memory_region.h",
"base/memory/weak_ptr.h",
"base/memory/writable_shared_memory_region.h",
"base/message_loop/incoming_task_queue.h",
"base/message_loop/message_loop.h",
"base/message_loop/message_loop_current.h",
"base/message_loop/message_loop_task_runner.h",
"base/message_loop/message_pump.h",
"base/message_loop/message_pump_default.h",
"base/message_loop/message_pump_for_io.h",
"base/message_loop/message_pump_for_ui.h",
"base/message_loop/message_pump_glib.h",
"base/message_loop/message_pump_libevent.h",
"base/message_loop/timer_slack.h",
"base/message_loop/watchable_io_message_pump_posix.h",
"base/metrics/bucket_ranges.h",
"base/metrics/dummy_histogram.h",
"base/metrics/field_trial.h",
"base/metrics/field_trial_param_associator.h",
"base/metrics/field_trial_params.h",
"base/metrics/histogram.h",
"base/metrics/histogram_base.h",
"base/metrics/histogram_delta_serialization.h",
"base/metrics/histogram_flattener.h",
"base/metrics/histogram_functions.h",
"base/metrics/histogram_macros.h",
"base/metrics/histogram_macros_internal.h",
"base/metrics/histogram_macros_local.h",
"base/metrics/histogram_samples.h",
"base/metrics/histogram_snapshot_manager.h",
"base/metrics/metrics_hashes.h",
"base/metrics/persistent_histogram_allocator.h",
"base/metrics/persistent_histogram_storage.h",
"base/metrics/persistent_memory_allocator.h",
"base/metrics/persistent_sample_map.h",
"base/metrics/record_histogram_checker.h",
"base/metrics/sample_map.h",
"base/metrics/sample_vector.h",
"base/metrics/single_sample_metrics.h",
"base/metrics/sparse_histogram.h",
"base/metrics/statistics_recorder.h",
"base/metrics/user_metrics.h",
"base/metrics/user_metrics_action.h",
"base/native_library.h",
"base/no_destructor.h",
"base/numerics/checked_math.h",
"base/numerics/checked_math_impl.h",
"base/numerics/clamped_math.h",
"base/numerics/clamped_math_impl.h",
"base/numerics/math_constants.h",
"base/numerics/ranges.h",
"base/numerics/safe_conversions.h",
"base/numerics/safe_conversions_arm_impl.h",
"base/numerics/safe_conversions_impl.h",
"base/numerics/safe_math.h",
"base/numerics/safe_math_arm_impl.h",
"base/numerics/safe_math_clang_gcc_impl.h",
"base/numerics/safe_math_shared_impl.h",
"base/observer_list.h",
"base/observer_list_threadsafe.h",
"base/optional.h",
"base/os_compat_android.h",
"base/path_service.h",
"base/pending_task.h",
"base/pickle.h",
"base/posix/eintr_wrapper.h",
"base/posix/file_descriptor_shuffle.h",
"base/posix/global_descriptors.h",
"base/posix/safe_strerror.h",
"base/posix/unix_domain_socket.h",
"base/post_task_and_reply_with_result_internal.h",
"base/power_monitor/power_monitor.h",
"base/power_monitor/power_monitor_device_source.h",
"base/power_monitor/power_monitor_source.h",
"base/power_monitor/power_observer.h",
"base/process/internal_aix.h",
"base/process/internal_linux.h",
"base/process/kill.h",
"base/process/launch.h",
"base/process/memory.h",
"base/process/process.h",
"base/process/process_handle.h",
"base/process/process_info.h",
"base/process/process_iterator.h",
"base/process/process_metrics.h",
"base/process/process_metrics_iocounters.h",
"base/rand_util.h",
"base/run_loop.h",
"base/sampling_heap_profiler/lock_free_address_hash_set.h",
"base/sampling_heap_profiler/sampling_heap_profiler.h",
"base/scoped_clear_errno.h",
"base/scoped_generic.h",
"base/scoped_native_library.h",
"base/scoped_observer.h",
"base/sequence_checker.h",
"base/sequence_checker_impl.h",
"base/sequence_token.h",
"base/sequenced_task_runner.h",
"base/sequenced_task_runner_helpers.h",
"base/sha1.h",
"base/single_thread_task_runner.h",
"base/stl_util.h",
"base/strings/char_traits.h",
"base/strings/nullable_string16.h",
"base/strings/old_utf_string_conversions.h",
"base/strings/pattern.h",
"base/strings/safe_sprintf.h",
"base/strings/strcat.h",
"base/strings/string16.h",
"base/strings/string_number_conversions.h",
"base/strings/string_piece.h",
"base/strings/string_piece_forward.h",
"base/strings/string_split.h",
"base/strings/string_tokenizer.h",
"base/strings/string_util.h",
"base/strings/string_util_posix.h",
"base/strings/stringize_macros.h",
"base/strings/stringprintf.h",
"base/strings/sys_string_conversions.h",
"base/strings/utf_string_conversion_utils.h",
"base/strings/utf_string_conversions.h",
"base/sync_socket.h",
"base/synchronization/atomic_flag.h",
"base/synchronization/cancellation_flag.h",
"base/synchronization/condition_variable.h",
"base/synchronization/lock.h",
"base/synchronization/lock_impl.h",
"base/synchronization/spin_wait.h",
"base/synchronization/synchronization_buildflags.h",
"base/synchronization/waitable_event.h",
"base/synchronization/waitable_event_watcher.h",
"base/sys_byteorder.h",
"base/sys_info.h",
"base/sys_info_internal.h",
"base/task/cancelable_task_tracker.h",
"base/task/sequence_manager/enqueue_order.h",
"base/task/sequence_manager/graceful_queue_shutdown_helper.h",
"base/task/sequence_manager/intrusive_heap.h",
"base/task/sequence_manager/lazily_deallocated_deque.h",
"base/task/sequence_manager/lazy_now.h",
"base/task/sequence_manager/moveable_auto_lock.h",
"base/task/sequence_manager/real_time_domain.h",
"base/task/sequence_manager/sequence_manager.h",
"base/task/sequence_manager/sequence_manager_impl.h",
"base/task/sequence_manager/sequenced_task_source.h",
"base/task/sequence_manager/task_queue.h",
"base/task/sequence_manager/task_queue_impl.h",
"base/task/sequence_manager/task_queue_selector.h",
"base/task/sequence_manager/task_queue_selector_logic.h",
"base/task/sequence_manager/task_time_observer.h",
"base/task/sequence_manager/test/fake_task.h",
"base/task/sequence_manager/test/lazy_thread_controller_for_test.h",
"base/task/sequence_manager/test/mock_time_domain.h",
"base/task/sequence_manager/test/sequence_manager_for_test.h",
"base/task/sequence_manager/test/test_task_queue.h",
"base/task/sequence_manager/test/test_task_time_observer.h",
"base/task/sequence_manager/thread_controller.h",
"base/task/sequence_manager/thread_controller_impl.h",
"base/task/sequence_manager/thread_controller_with_message_pump_impl.h",
"base/task/sequence_manager/time_domain.h",
"base/task/sequence_manager/work_queue.h",
"base/task/sequence_manager/work_queue_sets.h",
"base/task_runner.h",
"base/task_runner_util.h",
"base/task_scheduler/can_schedule_sequence_observer.h",
"base/task_scheduler/delayed_task_manager.h",
"base/task_scheduler/environment_config.h",
"base/task_scheduler/lazy_task_runner.h",
"base/task_scheduler/post_task.h",
"base/task_scheduler/priority_queue.h",
"base/task_scheduler/scheduler_lock.h",
"base/task_scheduler/scheduler_lock_impl.h",
"base/task_scheduler/scheduler_single_thread_task_runner_manager.h",
"base/task_scheduler/scheduler_worker.h",
"base/task_scheduler/scheduler_worker_observer.h",
"base/task_scheduler/scheduler_worker_params.h",
"base/task_scheduler/scheduler_worker_pool.h",
"base/task_scheduler/scheduler_worker_pool_impl.h",
"base/task_scheduler/scheduler_worker_pool_params.h",
"base/task_scheduler/scheduler_worker_stack.h",
"base/task_scheduler/scoped_set_task_priority_for_current_thread.h",
"base/task_scheduler/sequence.h",
"base/task_scheduler/sequence_sort_key.h",
"base/task_scheduler/service_thread.h",
"base/task_scheduler/single_thread_task_runner_thread_mode.h",
"base/task_scheduler/task.h",
"base/task_scheduler/task_scheduler.h",
"base/task_scheduler/task_scheduler_impl.h",
"base/task_scheduler/task_tracker.h",
"base/task_scheduler/task_tracker_posix.h",
"base/task_scheduler/task_traits.h",
"base/task_scheduler/task_traits_details.h",
"base/task_scheduler/test_utils.h",
"base/task_scheduler/tracked_ref.h",
"base/template_util.h",
"base/test/bind_test_util.h",
"base/test/copy_only_int.h",
"base/test/fontconfig_util_linux.h",
"base/test/gtest_util.h",
"base/test/metrics/histogram_enum_reader.h",
"base/test/metrics/histogram_tester.h",
"base/test/mock_entropy_provider.h",
"base/test/move_only_int.h",
"base/test/multiprocess_test.h",
"base/test/scoped_environment_variable_override.h",
"base/test/scoped_feature_list.h",
"base/test/scoped_locale.h",
"base/test/scoped_task_environment.h",
"base/test/simple_test_clock.h",
"base/test/simple_test_tick_clock.h",
"base/test/test_file_util.h",
"base/test/test_io_thread.h",
"base/test/test_mock_time_task_runner.h",
"base/test/test_pending_task.h",
"base/test/test_shared_memory_util.h",
"base/test/test_simple_task_runner.h",
"base/test/test_switches.h",
"base/test/test_timeouts.h",
"base/third_party/dynamic_annotations/dynamic_annotations.h",
"base/third_party/icu/icu_utf.h",
"base/third_party/libevent/event.h",
"base/third_party/nspr/prtime.h",
"base/third_party/symbolize/symbolize.h",
"base/third_party/valgrind/memcheck.h",
"base/third_party/valgrind/valgrind.h",
"base/thread_annotations.h",
"base/threading/platform_thread.h",
"base/threading/platform_thread_internal_posix.h",
"base/threading/post_task_and_reply_impl.h",
"base/threading/scoped_blocking_call.h",
"base/threading/sequence_local_storage_map.h",
"base/threading/sequence_local_storage_slot.h",
"base/threading/sequenced_task_runner_handle.h",
"base/threading/simple_thread.h",
"base/threading/thread.h",
"base/threading/thread_checker.h",
"base/threading/thread_checker_impl.h",
"base/threading/thread_collision_warner.h",
"base/threading/thread_id_name_manager.h",
"base/threading/thread_local.h",
"base/threading/thread_local_storage.h",
"base/threading/thread_restrictions.h",
"base/threading/thread_task_runner_handle.h",
"base/time/clock.h",
"base/time/default_clock.h",
"base/time/default_tick_clock.h",
"base/time/tick_clock.h",
"base/time/time.h",
"base/time/time_override.h",
"base/time/time_to_iso8601.h",
"base/timer/elapsed_timer.h",
"base/timer/hi_res_timer_manager.h",
"base/timer/mock_timer.h",
"base/timer/timer.h",
"base/trace_event/common/trace_event_common.h",
"base/trace_event/heap_profiler.h",
"base/trace_event/trace_event.h",
"base/tuple.h",
"base/unguessable_token.h",
"base/value_iterators.h",
"base/values.h",
"base/version.h",
"base/vlog.h",
"build/build_config.h",
"build/buildflag.h",
"device/bluetooth/bluetooth_advertisement.h",
"device/bluetooth/bluetooth_common.h",
"device/bluetooth/bluetooth_export.h",
"device/bluetooth/bluetooth_uuid.h",
"device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h",
"testing/gmock/include/gmock/gmock.h",
"testing/gtest/include/gtest/gtest.h",
"testing/gtest/include/gtest/gtest_prod.h",
"testing/multiprocess_func_list.h",
"testing/platform_test.h",
"third_party/ashmem/ashmem.h",
"third_party/modp_b64/modp_b64.h",
"third_party/protobuf/src/google/protobuf/message_lite.h",
"third_party/re2/src/re2/re2.h",
"ui/gfx/geometry/insets.h",
"ui/gfx/geometry/insets_f.h",
"ui/gfx/geometry/mojo/geometry_struct_traits.h",
"ui/gfx/geometry/point.h",
"ui/gfx/geometry/point_conversions.h",
"ui/gfx/geometry/point_f.h",
"ui/gfx/geometry/rect.h",
"ui/gfx/geometry/rect_f.h",
"ui/gfx/geometry/safe_integer_conversions.h",
"ui/gfx/geometry/scroll_offset.h",
"ui/gfx/geometry/size.h",
"ui/gfx/geometry/size_conversions.h",
"ui/gfx/geometry/size_f.h",
"ui/gfx/geometry/vector2d.h",
"ui/gfx/geometry/vector2d_f.h",
"ui/gfx/gfx_export.h",
"ui/gfx/range/gfx_range_export.h",
"ui/gfx/range/mojo/range_struct_traits.h",
"ui/gfx/range/range.h",
"ui/gfx/range/range_f.h",
],
}
gensrcs {
name: "libchrome-include",
cmd: "$(location libchrome_tools/include_generator.py) $(in) $(out)",
tool_files: ["libchrome_tools/include_generator.py"],
export_include_dirs: ["."],
srcs: [":libchrome-include-sources"],
output_extension: "h",
}
cc_defaults {
name: "libchrome-defaults",
// Set clang to "true" to force clang or "false" to force gcc.
// clang: true,
cflags: [
"-Wall",
"-Werror",
"-Wno-deprecated-declarations",
"-Wno-implicit-fallthrough",
// memory_mapped_file.cc:80, json_parser.cc:264,
// sys_string_conversions_posix.cc:122, and
// icu_utf.cc:161,165 have -Wno-implicit-fallthrough.
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
],
// Note: Although the generated header files are exported here, in building
// libchrome, "." has priority (unlike building projects using libchrome),
// so the raw header files are used for them.
generated_headers: ["libchrome-include"],
export_generated_headers: ["libchrome-include"],
header_libs: ["jni_headers"],
export_header_lib_headers: ["jni_headers"],
target: {
host: {
cflags: [
"-D__ANDROID_HOST__",
"-DDONT_EMBED_BUILD_METADATA",
],
},
darwin: {
enabled: false,
},
},
}
cc_defaults {
name: "libchrome-test-defaults",
defaults: ["libchrome-defaults"],
cflags: [
"-Wno-unused-function",
"-Wno-unused-variable",
],
}
libchromeCommonSrc = [
"base/at_exit.cc",
"base/barrier_closure.cc",
"base/base64.cc",
"base/base64url.cc",
"base/base_paths.cc",
"base/base_paths_posix.cc",
"base/base_switches.cc",
"base/big_endian.cc",
"base/build_time.cc",
"base/callback_helpers.cc",
"base/callback_internal.cc",
"base/command_line.cc",
"base/cpu.cc",
"base/debug/activity_tracker.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/proc_maps_linux.cc",
"base/debug/profiler.cc",
"base/debug/stack_trace.cc",
"base/debug/task_annotator.cc",
"base/environment.cc",
"base/feature_list.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_constants.cc",
"base/files/file_path_watcher.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/memory_mapped_file.cc",
"base/files/memory_mapped_file_posix.cc",
"base/files/scoped_file.cc",
"base/files/scoped_temp_dir.cc",
"base/guid.cc",
"base/hash.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/lazy_instance_helpers.cc",
"base/location.cc",
"base/logging.cc",
"base/md5.cc",
"base/memory/aligned_memory.cc",
"base/memory/platform_shared_memory_region.cc",
"base/memory/read_only_shared_memory_region.cc",
"base/memory/ref_counted.cc",
"base/memory/ref_counted_memory.cc",
"base/memory/shared_memory_handle.cc",
"base/memory/shared_memory_helper.cc",
"base/memory/shared_memory_mapping.cc",
"base/memory/unsafe_shared_memory_region.cc",
"base/memory/weak_ptr.cc",
"base/memory/writable_shared_memory_region.cc",
"base/message_loop/incoming_task_queue.cc",
"base/message_loop/message_loop.cc",
"base/message_loop/message_loop_current.cc",
"base/message_loop/message_loop_task_runner.cc",
"base/message_loop/message_pump.cc",
"base/message_loop/message_pump_default.cc",
"base/message_loop/message_pump_libevent.cc",
"base/message_loop/watchable_io_message_pump_posix.cc",
"base/metrics/bucket_ranges.cc",
"base/metrics/dummy_histogram.cc",
"base/metrics/field_trial.cc",
"base/metrics/field_trial_param_associator.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/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_threadsafe.cc",
"base/path_service.cc",
"base/pending_task.cc",
"base/pickle.cc",
"base/posix/file_descriptor_shuffle.cc",
"base/posix/global_descriptors.cc",
"base/posix/safe_strerror.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/process_handle.cc",
"base/process/process_handle_posix.cc",
"base/process/process_iterator.cc",
"base/process/process_metrics.cc",
"base/process/process_metrics_posix.cc",
"base/process/process_posix.cc",
"base/rand_util.cc",
"base/rand_util_posix.cc",
"base/run_loop.cc",
"base/scoped_native_library.cc",
"base/sequence_checker_impl.cc",
"base/sequence_token.cc",
"base/sequenced_task_runner.cc",
"base/sha1.cc",
"base/strings/nullable_string16.cc",
"base/strings/pattern.cc",
"base/strings/safe_sprintf.cc",
"base/strings/string16.cc",
"base/strings/string_number_conversions.cc",
"base/strings/string_piece.cc",
"base/strings/string_split.cc",
"base/strings/string_util.cc",
"base/strings/string_util_constants.cc",
"base/strings/stringprintf.cc",
"base/strings/utf_string_conversion_utils.cc",
"base/strings/utf_string_conversions.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_posix.cc",
"base/sys_info.cc",
"base/sys_info_posix.cc",
"base/task/cancelable_task_tracker.cc",
"base/task_runner.cc",
"base/task_scheduler/scheduler_lock_impl.cc",
"base/task_scheduler/scoped_set_task_priority_for_current_thread.cc",
"base/task_scheduler/sequence.cc",
"base/task_scheduler/sequence_sort_key.cc",
"base/task_scheduler/task.cc",
"base/task_scheduler/task_traits.cc",
"base/third_party/dynamic_annotations/dynamic_annotations.c",
"base/third_party/icu/icu_utf.cc",
"base/third_party/nspr/prtime.cc",
"base/threading/platform_thread_posix.cc",
"base/threading/post_task_and_reply_impl.cc",
"base/threading/scoped_blocking_call.cc",
"base/threading/sequence_local_storage_map.cc",
"base/threading/sequence_local_storage_slot.cc",
"base/threading/sequenced_task_runner_handle.cc",
"base/threading/simple_thread.cc",
"base/threading/thread.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_task_runner_handle.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_exploded_posix.cc",
"base/time/time_now_posix.cc",
"base/time/time_override.cc",
"base/timer/elapsed_timer.cc",
"base/timer/timer.cc",
"base/unguessable_token.cc",
"base/value_iterators.cc",
"base/values.cc",
"base/version.cc",
"base/vlog.cc",
"device/bluetooth/bluetooth_advertisement.cc",
"device/bluetooth/bluetooth_uuid.cc",
"device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.cc",
"ui/gfx/geometry/insets.cc",
"ui/gfx/geometry/insets_f.cc",
"ui/gfx/geometry/point.cc",
"ui/gfx/geometry/point_conversions.cc",
"ui/gfx/geometry/point_f.cc",
"ui/gfx/geometry/rect.cc",
"ui/gfx/geometry/rect_f.cc",
"ui/gfx/geometry/size.cc",
"ui/gfx/geometry/size_conversions.cc",
"ui/gfx/geometry/size_f.cc",
"ui/gfx/geometry/vector2d.cc",
"ui/gfx/geometry/vector2d_f.cc",
"ui/gfx/range/range.cc",
"ui/gfx/range/range_f.cc",
]
libchromeLinuxSrc = [
"base/files/file_path_watcher_linux.cc",
"base/files/file_util_linux.cc",
"base/memory/shared_memory_posix.cc",
"base/posix/unix_domain_socket.cc",
"base/process/internal_linux.cc",
"base/process/memory_linux.cc",
"base/process/process_handle_linux.cc",
"base/process/process_info_linux.cc",
"base/process/process_iterator_linux.cc",
"base/process/process_metrics_linux.cc",
"base/strings/sys_string_conversions_posix.cc",
"base/sys_info_linux.cc",
"base/threading/platform_thread_internal_posix.cc",
"base/threading/platform_thread_linux.cc",
]
libchromeLinuxGlibcSrc = [
"base/allocator/allocator_shim.cc",
"base/allocator/allocator_shim_default_dispatch_to_glibc.cc",
"base/debug/stack_trace_posix.cc",
"base/memory/platform_shared_memory_region_posix.cc",
"base/memory/shared_memory_handle_posix.cc",
]
libchromeLinuxBionicSrc = [
"base/debug/stack_trace_android.cc",
"base/memory/platform_shared_memory_region_posix.cc",
"base/memory/shared_memory_handle_posix.cc",
]
libchromeAndroidSrc = [
"base/android/android_hardware_buffer_compat.cc",
"base/android/build_info.cc",
"base/android/content_uri_utils.cc",
"base/android/java_exception_reporter.cc",
"base/android/jni_android.cc",
"base/android/jni_array.cc",
"base/android/jni_string.cc",
"base/android/path_utils.cc",
"base/android/scoped_java_ref.cc",
"base/android/scoped_hardware_buffer_handle.cc",
"base/android/sys_utils.cc",
"base/base_paths_android.cc",
"base/debug/stack_trace_android.cc",
"base/memory/platform_shared_memory_region_android.cc",
"base/memory/shared_memory_android.cc",
"base/memory/shared_memory_handle_android.cc",
"base/os_compat_android.cc",
"base/sys_info_android.cc",
"base/time/time_android.cc",
]
// libchrome static+shared for host and device
// ========================================================
cc_library {
name: "libchrome",
host_supported: true,
recovery_available: true,
vendor_available: true,
defaults: ["libchrome-defaults"],
srcs: libchromeCommonSrc,
export_shared_lib_headers: ["libbase"],
export_header_lib_headers: ["libgtest_prod_headers"],
shared_libs: [
"libbase",
"libevent",
],
header_libs: [
"libgtest_prod_headers",
],
static_libs: [
"libmodpb64",
],
generated_headers: [
"libmojo_jni_headers",
"libmojo_jni_registration_headers",
],
export_generated_headers: [
"libmojo_jni_registration_headers",
],
target: {
linux: {
srcs: libchromeLinuxSrc,
},
linux_bionic: {
srcs: libchromeLinuxBionicSrc,
shared_libs: [
"liblog",
],
},
linux_glibc: {
srcs: libchromeLinuxGlibcSrc,
},
android: {
srcs: libchromeAndroidSrc,
shared_libs: [
"libcutils",
"liblog",
],
},
},
}
// libchrome-crypto shared library for device
// ========================================================
// Similar to libchrome, generate wrapped header files. See comments for
// libchrome-include for the details.
gensrcs {
name: "libchrome-crypto-include",
cmd: "$(location libchrome_tools/include_generator.py) $(in) $(out)",
tool_files: ["libchrome_tools/include_generator.py"],
export_include_dirs: ["."],
srcs: ["crypto/**/*.h"],
output_extension: "h",
}
cc_library_shared {
name: "libchrome-crypto",
vendor_available: true,
defaults: ["libchrome-defaults"],
srcs: [
"crypto/openssl_util.cc",
"crypto/random.cc",
"crypto/secure_hash.cc",
"crypto/secure_util.cc",
"crypto/sha2.cc",
],
generated_headers: ["libchrome-crypto-include"],
export_generated_headers: ["libchrome-crypto-include"],
shared_libs: [
"libchrome",
"libcrypto",
"libssl",
],
}
// Helpers needed for unit tests.
// ========================================================
cc_library_static {
name: "libchrome_test_helpers",
defaults: ["libchrome-test-defaults"],
shared_libs: ["libchrome"],
host_supported: true,
srcs: [
"base/test/gtest_util.cc",
"base/test/simple_test_clock.cc",
"base/test/simple_test_tick_clock.cc",
"base/test/test_file_util.cc",
"base/test/test_file_util_linux.cc",
"base/test/test_switches.cc",
"base/test/test_timeouts.cc",
],
}
// Helpers needed for unit tests (for host).
// ========================================================
cc_library_host_static {
name: "libchrome_test_helpers-host",
defaults: ["libchrome-test-defaults"],
shared_libs: ["libchrome"],
srcs: ["base/test/simple_test_clock.cc"],
}
// Host and target unit tests. Run (from repo root) with:
// ./out/host/<arch>/nativetest/libchrome_test/libchrome_test
// or
// adb shell /data/nativetest/libchrome_test/libchrome_test
// ========================================================
cc_test {
name: "libchrome_test",
host_supported: true,
defaults: ["libchrome-test-defaults"],
srcs: [
"base/at_exit_unittest.cc",
"base/atomicops_unittest.cc",
"base/base64_unittest.cc",
"base/base64url_unittest.cc",
"base/big_endian_unittest.cc",
"base/bind_unittest.cc",
"base/bits_unittest.cc",
"base/build_time_unittest.cc",
"base/callback_helpers_unittest.cc",
"base/callback_list_unittest.cc",
"base/callback_unittest.cc",
"base/cancelable_callback_unittest.cc",
"base/command_line_unittest.cc",
"base/cpu_unittest.cc",
"base/debug/activity_tracker_unittest.cc",
"base/debug/debugger_unittest.cc",
"base/debug/leak_tracker_unittest.cc",
"base/environment_unittest.cc",
"base/files/dir_reader_posix_unittest.cc",
"base/files/file_descriptor_watcher_posix_unittest.cc",
"base/files/file_enumerator_unittest.cc",
"base/files/file_path_unittest.cc",
"base/files/file_path_watcher_unittest.cc",
"base/files/file_unittest.cc",
"base/files/important_file_writer_unittest.cc",
"base/files/scoped_temp_dir_unittest.cc",
"base/gmock_unittest.cc",
"base/guid_unittest.cc",
"base/json/json_parser_unittest.cc",
"base/json/json_reader_unittest.cc",
"base/json/json_value_converter_unittest.cc",
"base/json/json_value_serializer_unittest.cc",
"base/json/json_writer_unittest.cc",
"base/json/string_escape_unittest.cc",
"base/lazy_instance_unittest.cc",
"base/logging_unittest.cc",
"base/md5_unittest.cc",
"base/memory/aligned_memory_unittest.cc",
"base/memory/linked_ptr_unittest.cc",
"base/memory/ref_counted_memory_unittest.cc",
"base/memory/ref_counted_unittest.cc",
"base/memory/singleton_unittest.cc",
"base/memory/weak_ptr_unittest.cc",
"base/message_loop/message_loop_task_runner_unittest.cc",
"base/message_loop/message_loop_unittest.cc",
"base/metrics/bucket_ranges_unittest.cc",
"base/metrics/field_trial_unittest.cc",
"base/metrics/histogram_base_unittest.cc",
"base/metrics/histogram_macros_unittest.cc",
"base/metrics/histogram_snapshot_manager_unittest.cc",
"base/metrics/histogram_unittest.cc",
"base/metrics/metrics_hashes_unittest.cc",
"base/metrics/persistent_histogram_allocator_unittest.cc",
"base/metrics/persistent_memory_allocator_unittest.cc",
"base/metrics/persistent_sample_map_unittest.cc",
"base/metrics/sample_map_unittest.cc",
"base/metrics/sample_vector_unittest.cc",
"base/metrics/sparse_histogram_unittest.cc",
"base/metrics/statistics_recorder_unittest.cc",
"base/observer_list_unittest.cc",
"base/optional_unittest.cc",
"base/pickle_unittest.cc",
"base/posix/file_descriptor_shuffle_unittest.cc",
"base/posix/unix_domain_socket_unittest.cc",
"base/process/process_info_unittest.cc",
"base/process/process_metrics_unittest.cc",
"base/rand_util_unittest.cc",
"base/scoped_clear_errno_unittest.cc",
"base/scoped_generic_unittest.cc",
"base/security_unittest.cc",
"base/sequence_checker_unittest.cc",
"base/sequence_token_unittest.cc",
"base/sha1_unittest.cc",
"base/stl_util_unittest.cc",
"base/strings/pattern_unittest.cc",
"base/strings/string16_unittest.cc",
"base/strings/string_number_conversions_unittest.cc",
"base/strings/string_piece_unittest.cc",
"base/strings/string_split_unittest.cc",
"base/strings/string_util_unittest.cc",
"base/strings/stringprintf_unittest.cc",
"base/strings/sys_string_conversions_unittest.cc",
"base/strings/utf_string_conversions_unittest.cc",
"base/sync_socket_unittest.cc",
"base/synchronization/atomic_flag_unittest.cc",
"base/synchronization/condition_variable_unittest.cc",
"base/synchronization/lock_unittest.cc",
"base/synchronization/waitable_event_unittest.cc",
"base/sys_info_unittest.cc",
"base/task/cancelable_task_tracker_unittest.cc",
"base/task_runner_util_unittest.cc",
"base/task_scheduler/scheduler_lock_unittest.cc",
"base/task_scheduler/scoped_set_task_priority_for_current_thread_unittest.cc",
"base/task_scheduler/sequence_sort_key_unittest.cc",
"base/task_scheduler/sequence_unittest.cc",
"base/task_scheduler/task_traits.cc",
"base/template_util_unittest.cc",
"base/test/metrics/histogram_tester.cc",
"base/test/mock_entropy_provider.cc",
"base/test/multiprocess_test.cc",
"base/test/scoped_feature_list.cc",
"base/test/scoped_locale.cc",
"base/test/simple_test_tick_clock.cc",
"base/test/test_file_util.cc",
"base/test/test_file_util_linux.cc",
"base/test/test_file_util_posix.cc",
"base/test/test_io_thread.cc",
"base/test/test_mock_time_task_runner.cc",
"base/test/test_pending_task.cc",
"base/test/test_shared_memory_util.cc",
"base/test/test_simple_task_runner.cc",
"base/test/test_switches.cc",
"base/test/test_timeouts.cc",
"base/threading/platform_thread_unittest.cc",
"base/threading/simple_thread_unittest.cc",
"base/threading/thread_checker_unittest.cc",
"base/threading/thread_collision_warner_unittest.cc",
"base/threading/thread_id_name_manager_unittest.cc",
"base/threading/thread_local_storage_unittest.cc",
"base/threading/thread_local_unittest.cc",
"base/threading/thread_unittest.cc",
"base/time/pr_time_unittest.cc",
"base/time/time_unittest.cc",
"base/timer/hi_res_timer_manager_unittest.cc",
"base/timer/mock_timer.cc",
"base/tuple_unittest.cc",
"base/values_unittest.cc",
"base/version_unittest.cc",
"base/vlog_unittest.cc",
"testing/multiprocess_func_list.cc",
"testrunner.cc",
"ui/gfx/range/range_unittest.cc",
],
cflags: ["-DUNIT_TEST"],
shared_libs: [
"libchrome",
"libevent",
],
static_libs: [
"libgmock",
"libgtest",
],
target: {
android: {
srcs: [
"crypto/secure_hash_unittest.cc",
"crypto/sha2_unittest.cc",
],
shared_libs: [
"libchrome-crypto",
],
cflags: ["-DDONT_EMBED_BUILD_METADATA"],
},
},
}
filegroup {
name: "libmojo_mojom_files",
srcs: [
"ipc/ipc.mojom",
"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/big_buffer.mojom",
"mojo/public/mojom/base/big_string.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/process_id.mojom",
"mojo/public/mojom/base/read_only_buffer.mojom",
"mojo/public/mojom/base/ref_counted_memory.mojom",
"mojo/public/mojom/base/shared_memory.mojom",
"mojo/public/mojom/base/string16.mojom",
"mojo/public/mojom/base/text_direction.mojom",
"mojo/public/mojom/base/thread_priority.mojom",
"mojo/public/mojom/base/time.mojom",
"mojo/public/mojom/base/unguessable_token.mojom",
"mojo/public/mojom/base/values.mojom",
"ui/gfx/geometry/mojo/geometry.mojom",
"ui/gfx/range/mojo/range.mojom",
],
}
filegroup {
name: "libmojo_mojo_sources",
srcs: [
"mojo/**/*.cc",
],
exclude_srcs: [
// Unused in Chrome. Looks like mistakenly checked in.
// TODO(hidehiko): Remove this after the file is removed in Chrome
// repository. http://crrev.com/c/644531
"mojo/public/cpp/system/message.cc",
// No WTF support.
"mojo/public/cpp/bindings/lib/string_traits_wtf.cc",
// Exclude windows/mac/ios/fuchsia files.
"**/*_win.cc",
"**/*_fuchsia.cc",
"mojo/core/mach_port_relay.*",
"mojo/public/cpp/base/logfont_win*",
"mojo/public/mojom/base/logfont_win*",
// Exclude js binding related files.
"mojo/public/js/**/*",
// Exclude tests.
"**/*_unittest.cc",
"**/*_unittests.cc",
"**/*_perftest.cc",
"mojo/core/core_test_base.*",
"mojo/core/test/*",
"mojo/core/test_utils.*",
"mojo/public/c/system/tests/**/*",
"mojo/public/cpp/bindings/tests/**/*",
"mojo/public/cpp/system/tests/**/*",
"mojo/public/cpp/test_support/**/*",
"mojo/public/java/system/javatests/**/*",
"mojo/public/tests/**/*",
// Exclude memory allocator unsupported feature
"mojo/public/cpp/base/memory_allocator_dump_cross_process_uid*",
// Exclude fuzzers
"mojo/public/tools/fuzzers/**/*",
],
}
// Python in Chrome repository requires still Python 2.
python_defaults {
name: "libmojo_scripts",
version: {
py2: {
enabled: true,
},
py3: {
enabled: false,
},
},
}
python_binary_host {
name: "jni_generator",
main: "base/android/jni_generator/jni_generator.py",
srcs: [
"base/android/jni_generator/jni_generator.py",
"build/**/*.py",
],
defaults: ["libmojo_scripts"],
}
python_binary_host {
name: "jni_registration_generator",
main: "base/android/jni_generator/jni_registration_generator.py",
srcs: [
"base/android/jni_generator/jni_generator.py",
"base/android/jni_generator/jni_registration_generator.py",
"build/**/*.py",
],
defaults: ["libmojo_scripts"],
}
python_binary_host {
name: "mojom_bindings_generator",
main: "mojo/public/tools/bindings/mojom_bindings_generator.py",
srcs: [
"build/**/*.py",
"mojo/public/tools/bindings/**/*.py",
"third_party/jinja2/**/*.py",
"third_party/markupsafe/**/*.py",
"third_party/ply/**/*.py",
],
data: [
"mojo/public/tools/bindings/generators/cpp_templates/*.tmpl",
"mojo/public/tools/bindings/generators/java_templates/*.tmpl",
"mojo/public/tools/bindings/generators/js_templates/*.tmpl",
],
defaults: ["libmojo_scripts"],
}
genrule {
name: "libmojo_mojom_templates",
cmd: "$(location mojom_bindings_generator)" +
" --use_bundled_pylibs precompile" +
" -o $(genDir)",
tools: [
"mojom_bindings_generator",
],
out: [
"cpp_templates.zip",
"java_templates.zip",
"js_templates.zip",
],
}
python_binary_host {
name: "mojom_generate_type_mappings",
main: "libchrome_tools/mojom_generate_type_mappings.py",
srcs: [
"build/gn_helpers.py",
"libchrome_tools/mojom_generate_type_mappings.py",
"mojo/public/tools/bindings/generate_type_mappings.py",
"mojo/public/tools/bindings/pylib/mojom/fileutil.py",
"mojo/public/tools/bindings/pylib/mojom/generate/generator.py",
"mojo/public/tools/bindings/pylib/mojom/generate/module.py",
"mojo/public/tools/bindings/pylib/mojom/generate/pack.py",
],
defaults: ["libmojo_scripts"],
}
genrule {
name: "libmojo_common_custom_types__type_mappings",
cmd: "$(location mojom_generate_type_mappings)" +
" --output=$(out)" +
" $(in)",
tools: ["mojom_generate_type_mappings"],
srcs: [
"mojo/public/cpp/base/big_buffer.typemap",
"mojo/public/cpp/base/big_string.typemap",
"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/process_id.typemap",
"mojo/public/cpp/base/read_only_buffer.typemap",
"mojo/public/cpp/base/ref_counted_memory.typemap",
"mojo/public/cpp/base/shared_memory.typemap",
"mojo/public/cpp/base/string16.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",
"ui/gfx/geometry/mojo/geometry.typemap",
"ui/gfx/range/mojo/range.typemap",
],
out: ["common_custom_types__type_mappings"],
}
python_binary_host {
name: "mojom_types_downgrader",
main: "mojo/public/tools/bindings/mojom_types_downgrader.py",
srcs: [
"mojo/public/tools/bindings/mojom_types_downgrader.py",
],
defaults: ["libmojo_scripts"],
}
generate_mojom_downgraded_files {
name: "libmojo_mojom_downgraded_files",
srcs: [":libmojo_mojom_files"],
}
generate_mojom_pickles {
name: "libmojo_mojom_pickles",
srcs: [":libmojo_mojom_downgraded_files"],
}
generate_mojom_headers {
name: "libmojo_mojom_headers",
srcs: [":libmojo_mojom_downgraded_files"],
pickles: [":libmojo_mojom_pickles"],
templates: ":libmojo_mojom_templates",
flags: "--disallow_native_types",
typemaps: [":libmojo_common_custom_types__type_mappings"],
}
generate_mojom_srcs {
name: "libmojo_mojom_srcs",
srcs: [":libmojo_mojom_downgraded_files"],
pickles: [":libmojo_mojom_pickles"],
templates: ":libmojo_mojom_templates",
flags: "--disallow_native_types",
typemaps: [":libmojo_common_custom_types__type_mappings"],
}
genrule {
name: "libmojo_jni_headers",
cmd: "$(location libchrome_tools/jni_generator_helper.sh)" +
" --jni_generator=$(location jni_generator)" +
" --output_dir=$(genDir)/jni" +
" --includes=base/android/jni_generator/jni_generator_helper.h" +
" --ptr_type=long" +
" $(in)",
tools: [
"jni_generator",
],
tool_files: [
"libchrome_tools/jni_generator_helper.sh",
],
srcs: [
"base/android/java/src/org/chromium/base/BuildInfo.java",
"base/android/java/src/org/chromium/base/ContentUriUtils.java",
"base/android/java/src/org/chromium/base/JavaExceptionReporter.java",
"base/android/java/src/org/chromium/base/PathUtils.java",
"base/android/java/src/org/chromium/base/SysUtils.java",
"base/android/java/src/org/chromium/base/ThreadUtils.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java",
],
out: [
"jni/BaseRunLoop_jni.h",
"jni/BuildInfo_jni.h",
"jni/ContentUriUtils_jni.h",
"jni/CoreImpl_jni.h",
"jni/JavaExceptionReporter_jni.h",
"jni/PathUtils_jni.h",
"jni/SysUtils_jni.h",
"jni/WatcherImpl_jni.h",
],
}
genrule {
name: "libmojo_jni_registration_headers",
cmd: "$(location libchrome_tools/jni_registration_generator_helper.sh)" +
" --jni_generator=$(location jni_registration_generator)" +
" --output=$(genDir)/jni/libmojo_jni_registrations.h" +
" $(in)",
tools: [
"jni_registration_generator",
],
tool_files: [
"libchrome_tools/jni_registration_generator_helper.sh",
],
srcs: [
"base/android/java/src/org/chromium/base/BuildInfo.java",
"base/android/java/src/org/chromium/base/JavaExceptionReporter.java",
"base/android/java/src/org/chromium/base/ThreadUtils.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java",
],
out: [
"jni/libmojo_jni_registrations.h",
],
}
cc_library_shared {
name: "libmojo",
vendor_available: true,
generated_sources: ["libmojo_mojom_srcs"],
generated_headers: [
"libmojo_jni_headers",
"libmojo_jni_registration_headers",
"libmojo_mojom_headers",
],
export_generated_headers: [
"libmojo_jni_registration_headers",
"libmojo_mojom_headers",
],
srcs: [
":libmojo_mojo_sources",
"base/android/build_info.cc",
"base/android/java_exception_reporter.cc",
"base/android/jni_android.cc",
"base/android/jni_array.cc",
"base/android/jni_string.cc",
"base/android/scoped_java_ref.cc",
"ipc/ipc_message.cc",
"ipc/ipc_message_attachment.cc",
"ipc/ipc_message_attachment_set.cc",
"ipc/ipc_message_utils.cc",
"ipc/ipc_mojo_handle_attachment.cc",
"ipc/ipc_mojo_message_helper.cc",
"ipc/ipc_mojo_param_traits.cc",
"ipc/ipc_platform_file_attachment_posix.cc",
"ipc/native_handle_type_converters.cc",
],
cflags: [
"-DMOJO_CORE_LEGACY_PROTOCOL",
"-Wall",
"-Werror",
"-Wno-missing-field-initializers",
"-Wno-unused-parameter",
],
// We also pass NO_ASHMEM to make base::SharedMemory avoid using it and prefer
// the POSIX versions.
cppflags: [
"-DNO_ASHMEM",
"-Wno-extra",
"-Wno-ignored-qualifiers",
"-Wno-non-virtual-dtor",
"-Wno-sign-promo",
],
shared_libs: [
"libchrome",
"libchrome-crypto",
"libevent",
"liblog",
],
header_libs: ["jni_headers"],
export_include_dirs: ["."],
}
generate_mojom_srcjar {
name: "libmojo_mojom_java_srcs",
srcs: [":libmojo_mojom_downgraded_files"],
pickles: [":libmojo_mojom_pickles"],
srcjar: "libmojo_mojom.srcjar",
templates: ":libmojo_mojom_templates",
flags: "--disallow_native_types",
typemaps: [":libmojo_common_custom_types__type_mappings"],
}
java_library {
name: "android.mojo",
srcs: [
":libmojo_mojom_java_srcs",
"base/android/java/src/org/chromium/base/BuildConfig.java",
"base/android/java/src/org/chromium/base/BuildInfo.java",
"base/android/java/src/org/chromium/base/ContextUtils.java",
"base/android/java/src/org/chromium/base/DiscardableReferencePool.java",
"base/android/java/src/org/chromium/base/JavaExceptionReporter.java",
"base/android/java/src/org/chromium/base/Log.java",
"base/android/java/src/org/chromium/base/PackageUtils.java",
"base/android/java/src/org/chromium/base/StrictModeContext.java",
"base/android/java/src/org/chromium/base/Supplier.java",
"base/android/java/src/org/chromium/base/ThreadUtils.java",
"base/android/java/src/org/chromium/base/TimezoneUtils.java",
"base/android/java/src/org/chromium/base/VisibleForTesting.java",
"base/android/java/src/org/chromium/base/annotations/AccessedByNative.java",
"base/android/java/src/org/chromium/base/annotations/CalledByNative.java",
"base/android/java/src/org/chromium/base/annotations/CalledByNativeUnchecked.java",
"base/android/java/src/org/chromium/base/annotations/JNIAdditionalImport.java",
"base/android/java/src/org/chromium/base/annotations/JNINamespace.java",
"base/android/java/src/org/chromium/base/annotations/MainDex.java",
"base/android/java/src/org/chromium/base/annotations/NativeCall.java",
"base/android/java/src/org/chromium/base/annotations/NativeClassQualifiedName.java",
"base/android/java/src/org/chromium/base/annotations/RemovableInRelease.java",
"base/android/java/src/org/chromium/base/annotations/UsedByReflection.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/AssociatedInterfaceNotSupported.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/AssociatedInterfaceRequestNotSupported.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/AutoCloseableRouter.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/BindingsHelper.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Callbacks.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/ConnectionErrorHandler.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Connector.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/DataHeader.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/DelegatingConnectionErrorHandler.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/DeserializationException.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/ExceptionHandler.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/ExecutorFactory.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/HandleOwner.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/InterfaceControlMessagesHelper.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/InterfaceRequest.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Message.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/MessageHeader.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/MessageReceiver.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/MessageReceiverWithResponder.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Router.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/RouterImpl.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/SerializationException.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/ServiceMessage.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/SideEffectFreeCloseable.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Struct.java",
"mojo/public/java/bindings/src/org/chromium/mojo/bindings/Union.java",
"mojo/public/java/system/src/org/chromium/mojo/system/Core.java",
"mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java",
"mojo/public/java/system/src/org/chromium/mojo/system/Flags.java",
"mojo/public/java/system/src/org/chromium/mojo/system/Handle.java",
"mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java",
"mojo/public/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java",
"mojo/public/java/system/src/org/chromium/mojo/system/MojoException.java",
"mojo/public/java/system/src/org/chromium/mojo/system/MojoResult.java",
"mojo/public/java/system/src/org/chromium/mojo/system/Pair.java",
"mojo/public/java/system/src/org/chromium/mojo/system/ResultAnd.java",
"mojo/public/java/system/src/org/chromium/mojo/system/RunLoop.java",
"mojo/public/java/system/src/org/chromium/mojo/system/SharedBufferHandle.java",
"mojo/public/java/system/src/org/chromium/mojo/system/UntypedHandle.java",
"mojo/public/java/system/src/org/chromium/mojo/system/Watcher.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/BaseRunLoop.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/CoreImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/DataPipeConsumerHandleImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/DataPipeProducerHandleImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/HandleBase.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/MessagePipeHandleImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/SharedBufferHandleImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/UntypedHandleImpl.java",
"mojo/public/java/system/src/org/chromium/mojo/system/impl/WatcherImpl.java",
],
static_libs: [
"android-support-annotations",
],
}