Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 1 | # Copyright 2018 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
Qijiang Fan | 991a472 | 2020-02-17 17:49:12 +0900 | [diff] [blame] | 4 | # |
| 5 | # BUILD.gn doesn't compile all files in the directory to reduce build size. |
| 6 | # Missing files can be added if needed. |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 7 | |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 8 | import("//common-mk/mojom_bindings_generator.gni") |
Qijiang Fan | 675e1c7 | 2020-03-09 10:21:34 +0900 | [diff] [blame] | 9 | import("//common-mk/mojom_type_mappings_generator.gni") |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 10 | import("//common-mk/pkg_config.gni") |
| 11 | |
| 12 | group("all") { |
| 13 | deps = [ |
| 14 | ":libchrome", |
| 15 | ":libchrome-test", |
| 16 | ] |
Hidehiko Abe | c1e4543 | 2019-02-06 16:44:29 +0900 | [diff] [blame] | 17 | if (use.mojo) { |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 18 | deps += [ ":libmojo" ] |
| 19 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 20 | } |
| 21 | |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 22 | config("libchrome_config") { |
| 23 | # TODO(hidehiko): Consolidate with build_config.h. |
| 24 | defines = [ |
| 25 | "OS_CHROMEOS", |
| 26 | "USE_NSS_CERTS", |
| 27 | "USE_SYSTEM_LIBEVENT", |
| 28 | "NO_TCMALLOC", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 29 | "MOJO_CORE_LEGACY_PROTOCOL", |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 30 | ] |
Hidehiko Abe | 9887bc9 | 2019-06-03 00:31:12 +0900 | [diff] [blame] | 31 | if (use.asan) { |
| 32 | defines += [ "LEAK_SANITIZER" ] |
| 33 | } |
| 34 | |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 35 | include_dirs = [ "." ] |
| 36 | cflags = [ |
| 37 | "-Wno-deprecated-register", |
| 38 | "-Wno-narrowing", |
Qijiang Fan | 9bafc0a | 2020-05-12 00:57:20 +0900 | [diff] [blame] | 39 | "-Wno-unreachable-code-return", |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 40 | "-Wno-unused-local-typedefs", |
| 41 | "-Xclang-only=-Wno-char-subscripts", |
| 42 | ] |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 43 | |
Manoj Gupta | 084fa8e | 2019-04-03 16:49:12 -0700 | [diff] [blame] | 44 | # Address sanitizer + coverage builds do not support -z,defs. |
| 45 | if (!(use.asan || use.coverage)) { |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 46 | ldflags = [ "-Wl,-z,defs" ] |
| 47 | } |
| 48 | } |
| 49 | |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 50 | config("base_core_config") { |
Hidehiko Abe | 4941951 | 2018-12-15 00:36:33 +0900 | [diff] [blame] | 51 | cflags = [ |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 52 | # Suppressing warning in base/strings/stringprintf.cc. |
Hidehiko Abe | 4941951 | 2018-12-15 00:36:33 +0900 | [diff] [blame] | 53 | "-Wno-format-nonliteral", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 54 | |
Hidehiko Abe | 4941951 | 2018-12-15 00:36:33 +0900 | [diff] [blame] | 55 | # This is for _exit(1) in base/debug/debugger_posix.cc. |
| 56 | "-Wno-unreachable-code", |
| 57 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 58 | } |
| 59 | |
| 60 | libbase_sublibs = [ |
| 61 | { |
| 62 | name = "base-core" |
| 63 | output_name = name + "-${libbase_ver}" |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 64 | libs = [ |
| 65 | "pthread", |
| 66 | "rt", |
| 67 | "modp_b64", |
| 68 | ] |
| 69 | pkg_deps = [ |
| 70 | "glib-2.0", |
| 71 | "libevent", |
| 72 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 73 | configs = [ ":base_core_config" ] |
| 74 | sources = [ |
| 75 | "base/allocator/allocator_extension.cc", |
| 76 | "base/allocator/allocator_shim.cc", |
| 77 | "base/allocator/allocator_shim_default_dispatch_to_glibc.cc", |
| 78 | "base/at_exit.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 79 | "base/barrier_closure.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 80 | "base/base64.cc", |
| 81 | "base/base64url.cc", |
Hidehiko Abe | 780c6a9 | 2018-12-21 19:27:08 +0900 | [diff] [blame] | 82 | "base/base_paths.cc", |
| 83 | "base/base_paths_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 84 | "base/base_switches.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 85 | "base/big_endian.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 86 | "base/build_time.cc", |
| 87 | "base/callback_helpers.cc", |
| 88 | "base/callback_internal.cc", |
| 89 | "base/command_line.cc", |
| 90 | "base/cpu.cc", |
| 91 | "base/debug/activity_tracker.cc", |
| 92 | "base/debug/alias.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 93 | "base/debug/crash_logging.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 94 | "base/debug/debugger.cc", |
| 95 | "base/debug/debugger_posix.cc", |
| 96 | "base/debug/dump_without_crashing.cc", |
| 97 | "base/debug/stack_trace.cc", |
| 98 | "base/debug/stack_trace_posix.cc", |
| 99 | "base/debug/task_annotator.cc", |
| 100 | "base/environment.cc", |
| 101 | "base/feature_list.cc", |
| 102 | "base/files/file.cc", |
| 103 | "base/files/file_descriptor_watcher_posix.cc", |
| 104 | "base/files/file_enumerator.cc", |
| 105 | "base/files/file_enumerator_posix.cc", |
| 106 | "base/files/file_path.cc", |
| 107 | "base/files/file_path_constants.cc", |
| 108 | "base/files/file_path_watcher.cc", |
| 109 | "base/files/file_path_watcher_linux.cc", |
| 110 | "base/files/file_posix.cc", |
| 111 | "base/files/file_tracing.cc", |
| 112 | "base/files/file_util.cc", |
| 113 | "base/files/file_util_linux.cc", |
| 114 | "base/files/file_util_posix.cc", |
| 115 | "base/files/important_file_writer.cc", |
| 116 | "base/files/memory_mapped_file.cc", |
| 117 | "base/files/memory_mapped_file_posix.cc", |
| 118 | "base/files/scoped_file.cc", |
| 119 | "base/files/scoped_temp_dir.cc", |
| 120 | "base/guid.cc", |
| 121 | "base/hash.cc", |
| 122 | "base/json/json_file_value_serializer.cc", |
| 123 | "base/json/json_parser.cc", |
| 124 | "base/json/json_reader.cc", |
| 125 | "base/json/json_string_value_serializer.cc", |
| 126 | "base/json/json_value_converter.cc", |
| 127 | "base/json/json_writer.cc", |
| 128 | "base/json/string_escape.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 129 | "base/lazy_instance_helpers.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 130 | "base/location.cc", |
| 131 | "base/logging.cc", |
| 132 | "base/md5.cc", |
| 133 | "base/memory/aligned_memory.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 134 | "base/memory/platform_shared_memory_region.cc", |
| 135 | "base/memory/platform_shared_memory_region_posix.cc", |
| 136 | "base/memory/read_only_shared_memory_region.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 137 | "base/memory/ref_counted.cc", |
| 138 | "base/memory/ref_counted_memory.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 139 | "base/memory/shared_memory_handle.cc", |
| 140 | "base/memory/shared_memory_handle_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 141 | "base/memory/shared_memory_helper.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 142 | "base/memory/shared_memory_mapping.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 143 | "base/memory/shared_memory_posix.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 144 | "base/memory/unsafe_shared_memory_region.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 145 | "base/memory/weak_ptr.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 146 | "base/memory/writable_shared_memory_region.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 147 | "base/message_loop/incoming_task_queue.cc", |
| 148 | "base/message_loop/message_loop.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 149 | "base/message_loop/message_loop_current.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 150 | "base/message_loop/message_loop_task_runner.cc", |
| 151 | "base/message_loop/message_pump.cc", |
| 152 | "base/message_loop/message_pump_default.cc", |
| 153 | "base/message_loop/message_pump_glib.cc", |
| 154 | "base/message_loop/message_pump_libevent.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 155 | "base/message_loop/watchable_io_message_pump_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 156 | "base/metrics/bucket_ranges.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 157 | "base/metrics/dummy_histogram.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 158 | "base/metrics/field_trial.cc", |
| 159 | "base/metrics/field_trial_param_associator.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 160 | "base/metrics/field_trial_params.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 161 | "base/metrics/histogram.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 162 | "base/metrics/histogram_base.cc", |
| 163 | "base/metrics/histogram_functions.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 164 | "base/metrics/histogram_samples.cc", |
| 165 | "base/metrics/histogram_snapshot_manager.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 166 | "base/metrics/metrics_hashes.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 167 | "base/metrics/persistent_histogram_allocator.cc", |
| 168 | "base/metrics/persistent_memory_allocator.cc", |
| 169 | "base/metrics/persistent_sample_map.cc", |
| 170 | "base/metrics/sample_map.cc", |
| 171 | "base/metrics/sample_vector.cc", |
| 172 | "base/metrics/sparse_histogram.cc", |
| 173 | "base/metrics/statistics_recorder.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 174 | "base/observer_list_threadsafe.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 175 | "base/path_service.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 176 | "base/pending_task.cc", |
| 177 | "base/pickle.cc", |
| 178 | "base/posix/file_descriptor_shuffle.cc", |
| 179 | "base/posix/global_descriptors.cc", |
| 180 | "base/posix/safe_strerror.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 181 | "base/posix/unix_domain_socket.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 182 | "base/process/internal_linux.cc", |
| 183 | "base/process/kill.cc", |
| 184 | "base/process/kill_posix.cc", |
| 185 | "base/process/launch.cc", |
| 186 | "base/process/launch_posix.cc", |
| 187 | "base/process/memory.cc", |
| 188 | "base/process/memory_linux.cc", |
| 189 | "base/process/process_handle.cc", |
| 190 | "base/process/process_handle_linux.cc", |
Hidehiko Abe | 780c6a9 | 2018-12-21 19:27:08 +0900 | [diff] [blame] | 191 | "base/process/process_handle_posix.cc", |
| 192 | "base/process/process_info_linux.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 193 | "base/process/process_iterator.cc", |
| 194 | "base/process/process_iterator_linux.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 195 | "base/process/process_metrics.cc", |
| 196 | "base/process/process_metrics_linux.cc", |
| 197 | "base/process/process_metrics_posix.cc", |
| 198 | "base/process/process_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 199 | "base/rand_util.cc", |
| 200 | "base/rand_util_posix.cc", |
| 201 | "base/run_loop.cc", |
| 202 | "base/sequence_checker_impl.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 203 | "base/sequence_token.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 204 | "base/sequenced_task_runner.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 205 | "base/sha1.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 206 | "base/strings/nullable_string16.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 207 | "base/strings/pattern.cc", |
| 208 | "base/strings/safe_sprintf.cc", |
Anand K Mistry | 36b797f | 2020-02-14 13:50:46 +1100 | [diff] [blame] | 209 | "base/strings/strcat.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 210 | "base/strings/string16.cc", |
| 211 | "base/strings/string_number_conversions.cc", |
| 212 | "base/strings/string_piece.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 213 | "base/strings/string_split.cc", |
| 214 | "base/strings/string_util.cc", |
| 215 | "base/strings/string_util_constants.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 216 | "base/strings/stringprintf.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 217 | "base/strings/sys_string_conversions_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 218 | "base/strings/utf_string_conversion_utils.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 219 | "base/strings/utf_string_conversions.cc", |
| 220 | "base/sync_socket_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 221 | "base/synchronization/atomic_flag.cc", |
| 222 | "base/synchronization/condition_variable_posix.cc", |
| 223 | "base/synchronization/lock.cc", |
| 224 | "base/synchronization/lock_impl_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 225 | "base/synchronization/waitable_event_posix.cc", |
| 226 | "base/synchronization/waitable_event_watcher_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 227 | "base/sys_info.cc", |
| 228 | "base/sys_info_chromeos.cc", |
| 229 | "base/sys_info_linux.cc", |
| 230 | "base/sys_info_posix.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 231 | "base/task/cancelable_task_tracker.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 232 | "base/task_runner.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 233 | "base/task_scheduler/delayed_task_manager.cc", |
| 234 | "base/task_scheduler/environment_config.cc", |
Paul Moy | 5865a5a | 2020-03-25 12:55:25 -0600 | [diff] [blame] | 235 | "base/task_scheduler/lazy_task_runner.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 236 | "base/task_scheduler/post_task.cc", |
| 237 | "base/task_scheduler/priority_queue.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 238 | "base/task_scheduler/scheduler_lock_impl.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 239 | "base/task_scheduler/scheduler_single_thread_task_runner_manager.cc", |
| 240 | "base/task_scheduler/scheduler_worker.cc", |
| 241 | "base/task_scheduler/scheduler_worker_pool.cc", |
| 242 | "base/task_scheduler/scheduler_worker_pool_impl.cc", |
| 243 | "base/task_scheduler/scheduler_worker_pool_params.cc", |
| 244 | "base/task_scheduler/scheduler_worker_stack.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 245 | "base/task_scheduler/scoped_set_task_priority_for_current_thread.cc", |
| 246 | "base/task_scheduler/sequence.cc", |
| 247 | "base/task_scheduler/sequence_sort_key.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 248 | "base/task_scheduler/service_thread.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 249 | "base/task_scheduler/task.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 250 | "base/task_scheduler/task_scheduler.cc", |
| 251 | "base/task_scheduler/task_scheduler_impl.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 252 | "base/task_scheduler/task_tracker.cc", |
| 253 | "base/task_scheduler/task_tracker_posix.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 254 | "base/task_scheduler/task_traits.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 255 | "base/third_party/dynamic_annotations/dynamic_annotations.c", |
| 256 | "base/third_party/icu/icu_utf.cc", |
| 257 | "base/third_party/nspr/prtime.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 258 | "base/threading/platform_thread_internal_posix.cc", |
| 259 | "base/threading/platform_thread_linux.cc", |
| 260 | "base/threading/platform_thread_posix.cc", |
| 261 | "base/threading/post_task_and_reply_impl.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 262 | "base/threading/scoped_blocking_call.cc", |
| 263 | "base/threading/sequence_local_storage_map.cc", |
| 264 | "base/threading/sequence_local_storage_slot.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 265 | "base/threading/sequenced_task_runner_handle.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 266 | "base/threading/simple_thread.cc", |
| 267 | "base/threading/thread.cc", |
| 268 | "base/threading/thread_checker_impl.cc", |
| 269 | "base/threading/thread_collision_warner.cc", |
| 270 | "base/threading/thread_id_name_manager.cc", |
| 271 | "base/threading/thread_local_storage.cc", |
| 272 | "base/threading/thread_local_storage_posix.cc", |
| 273 | "base/threading/thread_restrictions.cc", |
| 274 | "base/threading/thread_task_runner_handle.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 275 | "base/time/clock.cc", |
| 276 | "base/time/default_clock.cc", |
| 277 | "base/time/default_tick_clock.cc", |
| 278 | "base/time/tick_clock.cc", |
| 279 | "base/time/time.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 280 | "base/time/time_conversion_posix.cc", |
| 281 | "base/time/time_exploded_posix.cc", |
| 282 | "base/time/time_now_posix.cc", |
| 283 | "base/time/time_override.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 284 | "base/timer/elapsed_timer.cc", |
| 285 | "base/timer/timer.cc", |
Hidehiko Abe | 780c6a9 | 2018-12-21 19:27:08 +0900 | [diff] [blame] | 286 | "base/unguessable_token.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 287 | "base/value_iterators.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 288 | "base/values.cc", |
| 289 | "base/version.cc", |
| 290 | "base/vlog.cc", |
| 291 | ] |
| 292 | }, |
| 293 | |
| 294 | { |
| 295 | name = "base-dl" |
| 296 | output_name = name + "-${libbase_ver}" |
| 297 | deps = [ ":base-core" ] |
| 298 | libs = [ "dl" ] |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 299 | sources = [ |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 300 | "base/native_library.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 301 | "base/native_library_posix.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 302 | "base/scoped_native_library.cc", |
| 303 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 304 | }, |
| 305 | |
| 306 | { |
| 307 | name = "base-policy" |
| 308 | output_name = name + "-${libbase_ver}" |
| 309 | deps = [ ":base-core" ] |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 310 | libs = [ "re2" ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 311 | sources = [ |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 312 | "components/json_schema/json_schema_constants.cc", |
| 313 | "components/json_schema/json_schema_validator.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 314 | "components/policy/core/common/policy_load_status.cc", |
| 315 | "components/policy/core/common/registry_dict.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 316 | "components/policy/core/common/schema.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 317 | ] |
| 318 | }, |
| 319 | |
| 320 | { |
| 321 | name = "base-base_test_support" |
| 322 | output_name = name + "-${libbase_ver}" |
| 323 | testonly = true |
| 324 | sources = [ |
Paul Moy | ba721ad | 2020-03-24 11:40:03 -0600 | [diff] [blame] | 325 | "base/test/scoped_task_environment.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 326 | "base/test/simple_test_clock.cc", |
| 327 | "base/test/simple_test_tick_clock.cc", |
| 328 | "base/test/test_file_util.cc", |
| 329 | "base/test/test_file_util_linux.cc", |
Hidehiko Abe | ba151bd | 2019-01-15 04:03:08 +0900 | [diff] [blame] | 330 | "base/test/test_mock_time_task_runner.cc", |
| 331 | "base/test/test_pending_task.cc", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 332 | "base/test/test_simple_task_runner.cc", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 333 | "base/test/test_switches.cc", |
| 334 | "base/test/test_timeouts.cc", |
| 335 | ] |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 336 | }, |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 337 | ] |
| 338 | |
| 339 | if (use.crypto) { |
| 340 | libbase_sublibs += [ |
| 341 | { |
| 342 | name = "base-crypto" |
| 343 | output_name = name + "-${libbase_ver}" |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 344 | deps = [ |
| 345 | ":base-core", |
| 346 | ":base-dl", |
| 347 | ] |
| 348 | pkg_deps = [ |
| 349 | "nss", |
| 350 | "openssl", |
| 351 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 352 | sources = [ |
| 353 | "crypto/hmac.cc", |
| 354 | "crypto/hmac_nss.cc", |
| 355 | "crypto/nss_key_util.cc", |
| 356 | "crypto/nss_util.cc", |
| 357 | "crypto/openssl_util.cc", |
| 358 | "crypto/p224.cc", |
| 359 | "crypto/p224_spake.cc", |
| 360 | "crypto/random.cc", |
| 361 | "crypto/rsa_private_key.cc", |
| 362 | "crypto/rsa_private_key_nss.cc", |
| 363 | "crypto/scoped_test_nss_db.cc", |
| 364 | "crypto/secure_hash.cc", |
| 365 | "crypto/secure_util.cc", |
| 366 | "crypto/sha2.cc", |
| 367 | "crypto/signature_creator_nss.cc", |
| 368 | "crypto/signature_verifier_nss.cc", |
| 369 | "crypto/symmetric_key_nss.cc", |
| 370 | "crypto/third_party/nss/rsawrapr.c", |
| 371 | "crypto/third_party/nss/sha512.cc", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 372 | |
Daniel Kurtz | 57fb3f3 | 2017-06-29 19:34:04 +0800 | [diff] [blame] | 373 | # Added to libchrome only (not upstream) to support OpenSSL 1.1 API |
| 374 | "crypto/libcrypto-compat.c", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 375 | ] |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 376 | }, |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 377 | ] |
| 378 | } |
| 379 | |
| 380 | if (use.dbus) { |
| 381 | libbase_sublibs += [ |
| 382 | { |
| 383 | name = "base-dbus" |
| 384 | output_name = name + "-${libbase_ver}" |
| 385 | deps = [ ":base-core" ] |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 386 | pkg_deps = [ "dbus-1" ] |
| 387 | if (use.fuzzer) { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 388 | pkg_deps += [ "protobuf" ] |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 389 | } else { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 390 | pkg_deps += [ "protobuf-lite" ] |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 391 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 392 | sources = [ |
| 393 | "dbus/bus.cc", |
| 394 | "dbus/dbus_statistics.cc", |
| 395 | "dbus/exported_object.cc", |
| 396 | "dbus/message.cc", |
| 397 | "dbus/object_manager.cc", |
| 398 | "dbus/object_path.cc", |
| 399 | "dbus/object_proxy.cc", |
| 400 | "dbus/property.cc", |
| 401 | "dbus/scoped_dbus_error.cc", |
| 402 | "dbus/string_util.cc", |
| 403 | "dbus/util.cc", |
| 404 | "dbus/values_util.cc", |
| 405 | ] |
| 406 | }, |
| 407 | |
| 408 | { |
| 409 | name = "base-dbus_test_support" |
| 410 | output_name = name + "-${libbase_ver}" |
| 411 | testonly = true |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 412 | pkg_deps = [ "dbus-1" ] |
| 413 | if (use.fuzzer) { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 414 | pkg_deps += [ "protobuf" ] |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 415 | } else { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 416 | pkg_deps += [ "protobuf-lite" ] |
Stephen Barber | fd0c4e3 | 2019-10-15 22:06:42 -0700 | [diff] [blame] | 417 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 418 | sources = [ |
| 419 | "dbus/mock_bus.cc", |
| 420 | "dbus/mock_exported_object.cc", |
| 421 | "dbus/mock_object_manager.cc", |
| 422 | "dbus/mock_object_proxy.cc", |
| 423 | ] |
| 424 | }, |
| 425 | ] |
| 426 | } |
| 427 | |
| 428 | if (use.timers) { |
| 429 | libbase_sublibs += [ |
| 430 | { |
| 431 | name = "base-timers" |
| 432 | output_name = name + "-${libbase_ver}" |
| 433 | deps = [ ":base-core" ] |
| 434 | sources = [ "components/timers/alarm_timer_chromeos.cc" ] |
| 435 | }, |
| 436 | |
| 437 | { |
| 438 | name = "base-timer_test_support" |
| 439 | output_name = name + "-${libbase_ver}" |
| 440 | testonly = true |
| 441 | sources = [ "base/timer/mock_timer.cc" ] |
| 442 | }, |
| 443 | ] |
| 444 | } |
| 445 | |
| 446 | # Generate static/shared libraries. |
| 447 | foreach(attr, libbase_sublibs) { |
| 448 | if (defined(attr.pkg_deps)) { |
| 449 | # If it depends on external packages, introduces -pkg-config config. |
| 450 | pkg_config(attr.name + "-pkg-config") { |
| 451 | pkg_deps = attr.pkg_deps |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | if (defined(attr.testonly) && attr.testonly) { |
| 456 | buildtype = "static_library" |
| 457 | } else { |
| 458 | buildtype = "shared_library" |
| 459 | } |
| 460 | target(buildtype, attr.name) { |
| 461 | output_name = attr.output_name |
| 462 | sources = attr.sources |
| 463 | if (defined(attr.deps)) { |
| 464 | deps = attr.deps |
| 465 | } |
| 466 | |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 467 | if (defined(attr.libs)) { |
| 468 | libs = attr.libs |
| 469 | } |
| 470 | |
| 471 | if (defined(attr.pkg_deps)) { |
| 472 | configs += [ ":" + attr.name + "-pkg-config" ] |
| 473 | } |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 474 | configs += [ |
| 475 | ":libchrome_config", |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 476 | "//common-mk:visibility_default", |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 477 | ] |
Hidehiko Abe | 6fea5a4 | 2018-12-18 04:26:55 +0900 | [diff] [blame] | 478 | if (buildtype == "static_library") { |
| 479 | configs -= [ "//common-mk:use_thin_archive" ] |
| 480 | configs += [ "//common-mk:nouse_thin_archive" ] |
| 481 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 482 | if (defined(attr.configs)) { |
| 483 | configs += attr.configs |
| 484 | } |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | action("base") { |
| 489 | deps = [] |
| 490 | foreach(attr, libbase_sublibs) { |
| 491 | if (!defined(attr.testonly) || !attr.testonly) { |
| 492 | deps += [ ":" + attr.name ] |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | script = "//common-mk/write_args.py" |
| 497 | outputs = [ "${root_out_dir}/lib/lib${target_name}-${libbase_ver}.so" ] |
| 498 | args = [ "--output" ] + outputs + [ "--" ] + [ |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 499 | "GROUP", |
| 500 | "(", |
| 501 | "AS_NEEDED", |
| 502 | "(", |
| 503 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 504 | foreach(attr, libbase_sublibs) { |
| 505 | if (!defined(attr.testonly) || !attr.testonly) { |
| 506 | args += [ "-l" + attr.output_name ] |
| 507 | } |
| 508 | } |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 509 | args += [ |
| 510 | ")", |
| 511 | ")", |
| 512 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 513 | } |
| 514 | |
| 515 | libchrome_exported_cflags = [ |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 516 | "-I/usr/include/base-${libbase_ver}", |
| 517 | "-Wno-unused-local-typedefs", |
| 518 | "-DBASE_VER=${libbase_ver}", |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 519 | ] |
| 520 | |
Hidehiko Abe | 9887bc9 | 2019-06-03 00:31:12 +0900 | [diff] [blame] | 521 | if (use.asan) { |
| 522 | libchrome_exported_cflags += [ "-DLEAK_SANITIZER" ] |
| 523 | } |
| 524 | |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 525 | generate_pkg_config("libchrome") { |
| 526 | deps = [ ":base" ] |
| 527 | output_name = "libchrome-${libbase_ver}" |
| 528 | description = "chrome base library" |
| 529 | version = "${libbase_ver}" |
| 530 | requires_private = [] |
| 531 | foreach(attr, libbase_sublibs) { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 532 | if ((!defined(attr.testonly) || !attr.testonly) && defined(attr.pkg_deps)) { |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 533 | requires_private += attr.pkg_deps |
| 534 | } |
| 535 | } |
Hidehiko Abe | e1f598f | 2019-01-15 01:32:39 +0900 | [diff] [blame] | 536 | libs = [ "-lbase-${libbase_ver}" ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 537 | libs_private = [] |
| 538 | foreach(attr, libbase_sublibs) { |
| 539 | if (!defined(attr.testonly) || !attr.testonly) { |
Hidehiko Abe | e1f598f | 2019-01-15 01:32:39 +0900 | [diff] [blame] | 540 | libs_private += [ "-l" + attr.output_name ] |
| 541 | if (defined(attr.libs)) { |
| 542 | foreach(lib, attr.libs) { |
| 543 | libs_private += [ "-l" + lib ] |
| 544 | } |
| 545 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 546 | } |
| 547 | } |
| 548 | cflags = libchrome_exported_cflags |
| 549 | } |
| 550 | |
| 551 | action("base-test") { |
| 552 | deps = [] |
| 553 | foreach(attr, libbase_sublibs) { |
| 554 | if (defined(attr.testonly) && attr.testonly) { |
| 555 | deps += [ ":" + attr.name ] |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | script = "//common-mk/write_args.py" |
| 560 | outputs = [ "${root_out_dir}/lib${target_name}-${libbase_ver}.a" ] |
| 561 | args = [ "--output" ] + outputs + [ "--" ] + [ |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 562 | "GROUP", |
| 563 | "(", |
| 564 | "AS_NEEDED", |
| 565 | "(", |
| 566 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 567 | foreach(attr, libbase_sublibs) { |
| 568 | if (defined(attr.testonly) && attr.testonly) { |
| 569 | args += [ "-l" + attr.output_name ] |
| 570 | } |
| 571 | } |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 572 | args += [ |
| 573 | ")", |
| 574 | ")", |
| 575 | ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 576 | } |
| 577 | |
| 578 | generate_pkg_config("libchrome-test") { |
| 579 | deps = [ ":base-test" ] |
| 580 | output_name = "libchrome-test-${libbase_ver}" |
| 581 | description = "chrome base test library" |
| 582 | version = "${libbase_ver}" |
| 583 | requires_private = [] |
| 584 | foreach(attr, libbase_sublibs) { |
| 585 | if (defined(attr.testonly) && attr.testonly && defined(attr.pkg_deps)) { |
| 586 | requires_private += attr.pkg_deps |
| 587 | } |
| 588 | } |
Hidehiko Abe | e1f598f | 2019-01-15 01:32:39 +0900 | [diff] [blame] | 589 | libs = [ "-lbase-test-${libbase_ver}" ] |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 590 | libs_private = [] |
| 591 | foreach(attr, libbase_sublibs) { |
| 592 | if (defined(attr.testonly) && attr.testonly) { |
Hidehiko Abe | e1f598f | 2019-01-15 01:32:39 +0900 | [diff] [blame] | 593 | libs_private += [ "-l" + attr.output_name ] |
| 594 | if (defined(attr.libs)) { |
| 595 | libs_private += [ "-l" + lib ] |
| 596 | } |
Hidehiko Abe | 6ddb2e0 | 2018-12-02 23:24:50 +0900 | [diff] [blame] | 597 | } |
| 598 | } |
| 599 | cflags = libchrome_exported_cflags |
| 600 | } |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 601 | |
Hidehiko Abe | c1e4543 | 2019-02-06 16:44:29 +0900 | [diff] [blame] | 602 | if (use.mojo) { |
Qijiang Fan | 675e1c7 | 2020-03-09 10:21:34 +0900 | [diff] [blame] | 603 | generate_mojom_type_mappings("mojom_type_mappings") { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 604 | mojom_type_mappings_generator = |
| 605 | "libchrome_tools/mojom_generate_type_mappings.py" |
Qijiang Fan | 675e1c7 | 2020-03-09 10:21:34 +0900 | [diff] [blame] | 606 | sources = [ |
| 607 | "mojo/public/cpp/base/big_buffer.typemap", |
| 608 | "mojo/public/cpp/base/big_string.typemap", |
| 609 | "mojo/public/cpp/base/file.typemap", |
| 610 | "mojo/public/cpp/base/file_error.typemap", |
| 611 | "mojo/public/cpp/base/file_info.typemap", |
| 612 | "mojo/public/cpp/base/file_path.typemap", |
| 613 | "mojo/public/cpp/base/memory_allocator_dump_cross_process_uid.typemap", |
| 614 | "mojo/public/cpp/base/process_id.typemap", |
| 615 | "mojo/public/cpp/base/read_only_buffer.typemap", |
| 616 | "mojo/public/cpp/base/ref_counted_memory.typemap", |
| 617 | "mojo/public/cpp/base/shared_memory.typemap", |
| 618 | "mojo/public/cpp/base/string16.typemap", |
| 619 | "mojo/public/cpp/base/text_direction.typemap", |
| 620 | "mojo/public/cpp/base/thread_priority.typemap", |
| 621 | "mojo/public/cpp/base/time.typemap", |
| 622 | "mojo/public/cpp/base/unguessable_token.typemap", |
| 623 | "mojo/public/cpp/base/values.typemap", |
| 624 | ] |
| 625 | } |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 626 | generate_mojom_bindings_gen("mojom_bindings_gen") { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 627 | mojom_bindings_generator = |
| 628 | "mojo/public/tools/bindings/mojom_bindings_generator.py" |
Qijiang Fan | f433fa8 | 2020-03-19 17:59:27 +0900 | [diff] [blame] | 629 | typemaps = get_target_outputs(":mojom_type_mappings") |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 630 | sources = [ |
| 631 | "ipc/ipc.mojom", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 632 | "mojo/public/mojom/base/big_buffer.mojom", |
| 633 | "mojo/public/mojom/base/big_string.mojom", |
| 634 | "mojo/public/mojom/base/file.mojom", |
| 635 | "mojo/public/mojom/base/file_error.mojom", |
| 636 | "mojo/public/mojom/base/file_info.mojom", |
| 637 | "mojo/public/mojom/base/file_path.mojom", |
Qijiang Fan | 675e1c7 | 2020-03-09 10:21:34 +0900 | [diff] [blame] | 638 | "mojo/public/mojom/base/memory_allocator_dump_cross_process_uid.mojom", |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 639 | "mojo/public/mojom/base/process_id.mojom", |
| 640 | "mojo/public/mojom/base/read_only_buffer.mojom", |
| 641 | "mojo/public/mojom/base/ref_counted_memory.mojom", |
| 642 | "mojo/public/mojom/base/shared_memory.mojom", |
| 643 | "mojo/public/mojom/base/string16.mojom", |
| 644 | "mojo/public/mojom/base/text_direction.mojom", |
| 645 | "mojo/public/mojom/base/thread_priority.mojom", |
| 646 | "mojo/public/mojom/base/time.mojom", |
| 647 | "mojo/public/mojom/base/unguessable_token.mojom", |
| 648 | "mojo/public/mojom/base/values.mojom", |
| 649 | "ui/gfx/geometry/mojo/geometry.mojom", |
| 650 | "ui/gfx/range/mojo/range.mojom", |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 651 | ] |
| 652 | } |
| 653 | |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 654 | generate_mojom_bindings_gen("mojom_bindings_native_gen") { |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 655 | mojom_bindings_generator = |
| 656 | "mojo/public/tools/bindings/mojom_bindings_generator.py" |
Hidehiko Abe | 1cedaef | 2019-03-28 15:15:30 +0900 | [diff] [blame] | 657 | sources = [ |
| 658 | "mojo/public/interfaces/bindings/interface_control_messages.mojom", |
| 659 | "mojo/public/interfaces/bindings/native_struct.mojom", |
| 660 | "mojo/public/interfaces/bindings/pipe_control_messages.mojom", |
| 661 | ] |
| 662 | disallow_native_types = true |
| 663 | disallow_interfaces = true |
| 664 | } |
| 665 | |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 666 | # Probably we should consider build libmojo as a part of libchrome. |
| 667 | # crbug.com/924035. |
| 668 | static_library("mojo") { |
| 669 | output_name = "mojo-${libbase_ver}" |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 670 | deps = [ |
| 671 | ":base-core", |
| 672 | ":base-crypto", |
| 673 | ":mojom_bindings_gen", |
| 674 | ":mojom_bindings_native_gen", |
| 675 | ":mojom_type_mappings", |
| 676 | ] |
| 677 | |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 678 | # TODO(hidehiko): Consolidate with build_config.h. |
| 679 | configs -= [ |
| 680 | "//common-mk:use_thin_archive", |
| 681 | "//common-mk:pie", |
| 682 | ] |
| 683 | configs += [ |
| 684 | ":libchrome_config", |
| 685 | "//common-mk:visibility_default", |
| 686 | "//common-mk:nouse_thin_archive", |
| 687 | "//common-mk:pic", |
| 688 | ] |
Clark Chung | 9f3106e | 2020-05-08 12:17:15 +0800 | [diff] [blame] | 689 | sources = |
| 690 | [ |
| 691 | "ipc/ipc_message.cc", |
| 692 | "ipc/ipc_message_attachment.cc", |
| 693 | "ipc/ipc_message_attachment_set.cc", |
| 694 | "ipc/ipc_message_utils.cc", |
| 695 | "ipc/ipc_mojo_handle_attachment.cc", |
| 696 | "ipc/ipc_mojo_message_helper.cc", |
| 697 | "ipc/ipc_mojo_param_traits.cc", |
| 698 | "ipc/ipc_platform_file_attachment_posix.cc", |
| 699 | "mojo/core/invitation_dispatcher.cc", |
| 700 | "mojo/core/connection_params.cc", |
| 701 | "mojo/core/channel_posix.cc", |
| 702 | "mojo/core/platform_handle_dispatcher.cc", |
| 703 | "mojo/core/mojo_core.cc", |
| 704 | "mojo/core/channel.cc", |
| 705 | "mojo/core/entrypoints.cc", |
| 706 | "mojo/core/broker_posix.cc", |
| 707 | "mojo/core/data_pipe_producer_dispatcher.cc", |
| 708 | "mojo/core/broker_host.cc", |
| 709 | "mojo/core/watcher_dispatcher.cc", |
| 710 | "mojo/core/request_context.cc", |
| 711 | "mojo/core/configuration.cc", |
| 712 | "mojo/core/node_channel.cc", |
| 713 | "mojo/core/shared_buffer_dispatcher.cc", |
| 714 | "mojo/core/watch.cc", |
| 715 | "mojo/core/embedder/scoped_ipc_support.cc", |
| 716 | "mojo/core/embedder/embedder.cc", |
| 717 | "mojo/core/message_pipe_dispatcher.cc", |
| 718 | "mojo/core/handle_table.cc", |
| 719 | "mojo/core/core.cc", |
| 720 | "mojo/core/ports/event.cc", |
| 721 | "mojo/core/ports/name.cc", |
| 722 | "mojo/core/ports/port.cc", |
| 723 | "mojo/core/ports/message_queue.cc", |
| 724 | "mojo/core/ports/port_locker.cc", |
| 725 | "mojo/core/ports/node.cc", |
| 726 | "mojo/core/ports/user_message.cc", |
| 727 | "mojo/core/ports/port_ref.cc", |
| 728 | "mojo/core/data_pipe_consumer_dispatcher.cc", |
| 729 | "mojo/core/scoped_process_handle.cc", |
| 730 | "mojo/core/node_controller.cc", |
| 731 | "mojo/core/watcher_set.cc", |
| 732 | "mojo/core/dispatcher.cc", |
| 733 | "mojo/core/platform_handle_in_transit.cc", |
| 734 | "mojo/core/platform_handle_utils.cc", |
| 735 | "mojo/core/platform_shared_memory_mapping.cc", |
| 736 | "mojo/core/user_message_impl.cc", |
| 737 | "mojo/core/data_pipe_control_message.cc", |
| 738 | "mojo/public/c/system/thunks.cc", |
| 739 | "mojo/public/cpp/base/big_string_mojom_traits.cc", |
| 740 | "mojo/public/cpp/base/shared_memory_mojom_traits.cc", |
| 741 | "mojo/public/cpp/base/unguessable_token_mojom_traits.cc", |
| 742 | "mojo/public/cpp/base/ref_counted_memory_mojom_traits.cc", |
| 743 | "mojo/public/cpp/base/big_buffer.cc", |
| 744 | "mojo/public/cpp/base/read_only_buffer_mojom_traits.cc", |
| 745 | "mojo/public/cpp/base/string16_mojom_traits.cc", |
| 746 | "mojo/public/cpp/base/big_buffer_mojom_traits.cc", |
| 747 | "mojo/public/cpp/base/file_info_mojom_traits.cc", |
| 748 | "mojo/public/cpp/base/time_mojom_traits.cc", |
| 749 | "mojo/public/cpp/base/thread_priority_mojom_traits.cc", |
| 750 | "mojo/public/cpp/base/text_direction_mojom_traits.cc", |
| 751 | "mojo/public/cpp/base/values_mojom_traits.cc", |
| 752 | "mojo/public/cpp/base/file_path_mojom_traits.cc", |
| 753 | "mojo/public/cpp/base/process_id_mojom_traits.cc", |
| 754 | "mojo/public/cpp/base/file_mojom_traits.cc", |
| 755 | "mojo/public/cpp/bindings/lib/serialization_context.cc", |
| 756 | "mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc", |
| 757 | "mojo/public/cpp/bindings/lib/array_internal.cc", |
| 758 | "mojo/public/cpp/bindings/lib/interface_ptr_state.cc", |
| 759 | "mojo/public/cpp/bindings/lib/buffer.cc", |
| 760 | "mojo/public/cpp/bindings/lib/sync_call_restrictions.cc", |
| 761 | "mojo/public/cpp/bindings/lib/multiplex_router.cc", |
| 762 | "mojo/public/cpp/bindings/lib/sync_handle_watcher.cc", |
| 763 | "mojo/public/cpp/bindings/lib/validation_errors.cc", |
| 764 | "mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc", |
| 765 | "mojo/public/cpp/bindings/lib/message_dumper.cc", |
| 766 | "mojo/public/cpp/bindings/lib/sync_event_watcher.cc", |
| 767 | "mojo/public/cpp/bindings/lib/task_runner_helper.cc", |
| 768 | "mojo/public/cpp/bindings/lib/sequence_local_sync_event_watcher.cc", |
| 769 | "mojo/public/cpp/bindings/lib/validation_context.cc", |
| 770 | "mojo/public/cpp/bindings/lib/associated_group.cc", |
| 771 | "mojo/public/cpp/bindings/lib/native_struct_serialization.cc", |
| 772 | "mojo/public/cpp/bindings/lib/validation_util.cc", |
| 773 | "mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc", |
| 774 | "mojo/public/cpp/bindings/lib/filter_chain.cc", |
| 775 | "mojo/public/cpp/bindings/lib/message.cc", |
| 776 | "mojo/public/cpp/bindings/lib/unserialized_message_context.cc", |
| 777 | "mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc", |
| 778 | "mojo/public/cpp/bindings/lib/control_message_proxy.cc", |
| 779 | "mojo/public/cpp/bindings/lib/control_message_handler.cc", |
| 780 | "mojo/public/cpp/bindings/lib/connector.cc", |
| 781 | "mojo/public/cpp/bindings/lib/interface_endpoint_client.cc", |
| 782 | "mojo/public/cpp/bindings/lib/sync_handle_registry.cc", |
| 783 | "mojo/public/cpp/bindings/lib/associated_binding.cc", |
| 784 | "mojo/public/cpp/bindings/lib/message_header_validator.cc", |
| 785 | "mojo/public/cpp/bindings/lib/associated_group_controller.cc", |
| 786 | "mojo/public/cpp/bindings/lib/associated_interface_ptr.cc", |
| 787 | "mojo/public/cpp/bindings/lib/fixed_buffer.cc", |
| 788 | "mojo/public/cpp/bindings/lib/message_internal.cc", |
| 789 | "mojo/public/cpp/bindings/lib/binding_state.cc", |
| 790 | "mojo/public/cpp/platform/platform_channel_endpoint.cc", |
| 791 | "mojo/public/cpp/platform/platform_handle.cc", |
| 792 | "mojo/public/cpp/platform/named_platform_channel.cc", |
| 793 | "mojo/public/cpp/platform/platform_channel.cc", |
| 794 | "mojo/public/cpp/platform/platform_channel_server_endpoint.cc", |
| 795 | "mojo/public/cpp/platform/socket_utils_posix.cc", |
| 796 | "mojo/public/cpp/platform/named_platform_channel_posix.cc", |
| 797 | "mojo/public/cpp/system/buffer.cc", |
| 798 | "mojo/public/cpp/system/platform_handle.cc", |
| 799 | "mojo/public/cpp/system/wait.cc", |
| 800 | "mojo/public/cpp/system/wait_set.cc", |
| 801 | "mojo/public/cpp/system/data_pipe_utils.cc", |
| 802 | "mojo/public/cpp/system/scope_to_message_pipe.cc", |
| 803 | "mojo/public/cpp/system/handle_signal_tracker.cc", |
| 804 | "mojo/public/cpp/system/trap.cc", |
| 805 | "mojo/public/cpp/system/isolated_connection.cc", |
| 806 | "mojo/public/cpp/system/string_data_pipe_producer.cc", |
| 807 | "mojo/public/cpp/system/data_pipe_drainer.cc", |
| 808 | "mojo/public/cpp/system/invitation.cc", |
| 809 | "mojo/public/cpp/system/simple_watcher.cc", |
| 810 | "mojo/public/cpp/system/file_data_pipe_producer.cc", |
| 811 | "mojo/public/cpp/system/message_pipe.cc", |
| 812 | ] + get_target_outputs(":mojom_bindings_gen") + |
| 813 | get_target_outputs(":mojom_bindings_native_gen") |
Hidehiko Abe | e925d02 | 2019-01-17 19:29:55 +0900 | [diff] [blame] | 814 | } |
| 815 | |
| 816 | generate_pkg_config("libmojo") { |
| 817 | deps = [ ":mojo" ] |
| 818 | output_name = "libmojo-${libbase_ver}" |
| 819 | description = "Chrome Mojo IPC library" |
| 820 | version = "${libbase_ver}" |
| 821 | libs = [ "-lmojo-${libbase_ver}" ] |
| 822 | cflags = [ |
| 823 | "-I/usr/lib/base-${libbase_ver}", |
| 824 | "-Wno-cast-qual", |
| 825 | "-Wno-cast-align", |
| 826 | ] |
| 827 | } |
| 828 | } |