1 # Copyright (c) 2013 The Chromium 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. 4 5 # HOW TO WRITE CONDITIONALS IN THIS FILE 6 # ====================================== 7 # 8 # In many other places, one would write a conditional that expresses all the 9 # cases when a source file is used or unused, and then either add or subtract 10 # it from the sources list in that case 11 # 12 # Since base includes so many low-level things that vary widely and 13 # unpredictably for the various build types, we prefer a slightly different 14 # style. Instead, there are big per-platform blocks of inclusions and 15 # exclusions. If a given file has an inclusion or exclusion rule that applies 16 # for multiple conditions, perfer to duplicate it in both lists. This makes it 17 # a bit easier to see which files apply in which cases rather than having a 18 # huge sequence of random-looking conditionals. 19 20 import("//build/buildflag_header.gni") 21 import("//build/config/allocator.gni") 22 import("//build/config/chromecast_build.gni") 23 import("//build/config/compiler/compiler.gni") 24 import("//build/config/nacl/config.gni") 25 import("//build/config/sysroot.gni") 26 import("//build/config/ui.gni") 27 import("//build/nocompile.gni") 28 import("//testing/test.gni") 29 30 declare_args() { 31 # Override this value to give a specific build date. 32 # See //base/build_time.cc and //build/write_build_date_header.py for more 33 # details and the expected format. 34 override_build_date = "N/A" 35 } 36 37 if (is_android) { 38 import("//build/config/android/rules.gni") 39 } 40 41 if (is_win) { 42 import("//build/config/win/visual_studio_version.gni") 43 } 44 45 config("base_flags") { 46 if (is_clang) { 47 cflags = [ 48 # Don't die on dtoa code that uses a char as an array index. 49 # This is required solely for base/third_party/dmg_fp/dtoa_wrapper.cc. 50 "-Wno-char-subscripts", 51 ] 52 } 53 } 54 55 config("base_implementation") { 56 defines = [ "BASE_IMPLEMENTATION" ] 57 configs = [ "//build/config/compiler:wexit_time_destructors" ] 58 } 59 60 if (is_win) { 61 # This is in a separate config so the flags can be applied to dependents. 62 # ldflags in GN aren't automatically inherited. 63 config("base_win_linker_flags") { 64 ldflags = [ 65 "/DELAYLOAD:cfgmgr32.dll", 66 "/DELAYLOAD:powrprof.dll", 67 "/DELAYLOAD:setupapi.dll", 68 ] 69 } 70 } 71 72 if (is_nacl_nonsfi) { 73 # Must be in a config because of how GN orders flags (otherwise -Wall will 74 # appear after this, and turn it back on). 75 config("nacl_nonsfi_warnings") { 76 # file_util_posix.cc contains a function which is not 77 # being used by nacl_helper_nonsfi. 78 cflags = [ "-Wno-unused-function" ] 79 } 80 } 81 82 if (is_nacl) { 83 # None of the files apply to nacl, and we can't make an empty static library. 84 group("base_paths") { 85 } 86 } else { 87 static_library("base_paths") { 88 sources = [ 89 "base_paths.cc", 90 "base_paths.h", 91 "base_paths_android.cc", 92 "base_paths_android.h", 93 "base_paths_mac.h", 94 "base_paths_mac.mm", 95 "base_paths_posix.cc", 96 "base_paths_posix.h", 97 "base_paths_win.cc", 98 "base_paths_win.h", 99 ] 100 101 if (is_android || is_mac || is_ios) { 102 sources -= [ "base_paths_posix.cc" ] 103 } 104 105 configs += [ ":base_implementation" ] 106 107 visibility = [ ":base" ] 108 } 109 } 110 111 if (is_android) { 112 config("android_system_libs") { 113 libs = [ "log" ] # Used by logging.cc. 114 } 115 } 116 117 # Base and everything it depends on should be a static library rather than 118 # a source set. Base is more of a "library" in the classic sense in that many 119 # small parts of it are used in many different contexts. This combined with a 120 # few static initializers floating around means that dead code stripping 121 # still leaves a lot of code behind that isn't always used. For example, this 122 # saves more than 40K for a smaller target like chrome_elf. 123 # 124 # Use static libraries for the helper stuff as well like //base/debug since 125 # those things refer back to base code, which will force base compilation units 126 # to be linked in where they wouldn't have otherwise. This does not include 127 # test code (test support and anything in the test directory) which should use 128 # source_set as is recommended for GN targets). 129 component("base") { 130 if (is_nacl_nonsfi) { 131 # TODO(phosek) bug 570839: If field_trial.cc is in a static library, 132 # nacl_helper_nonsfi doesn't link properly on Linux in debug builds. The 133 # reasons for this seem to involve obscure toolchain bugs. This should be 134 # fixed and this target should always be a static_library in the 135 # non-component case. 136 static_component_type = "source_set" 137 } 138 139 sources = [ 140 "allocator/allocator_check.cc", 141 "allocator/allocator_check.h", 142 "allocator/allocator_extension.cc", 143 "allocator/allocator_extension.h", 144 "android/animation_frame_time_histogram.cc", 145 "android/animation_frame_time_histogram.h", 146 "android/apk_assets.cc", 147 "android/apk_assets.h", 148 "android/application_status_listener.cc", 149 "android/application_status_listener.h", 150 "android/base_jni_onload.cc", 151 "android/base_jni_onload.h", 152 "android/base_jni_registrar.cc", 153 "android/base_jni_registrar.h", 154 "android/build_info.cc", 155 "android/build_info.h", 156 "android/callback_android.cc", 157 "android/callback_android.h", 158 "android/command_line_android.cc", 159 "android/command_line_android.h", 160 "android/content_uri_utils.cc", 161 "android/content_uri_utils.h", 162 "android/context_utils.cc", 163 "android/context_utils.h", 164 "android/cpu_features.cc", 165 "android/cxa_demangle_stub.cc", 166 "android/event_log.cc", 167 "android/event_log.h", 168 "android/field_trial_list.cc", 169 "android/field_trial_list.h", 170 "android/fifo_utils.cc", 171 "android/fifo_utils.h", 172 "android/important_file_writer_android.cc", 173 "android/important_file_writer_android.h", 174 "android/java_handler_thread.cc", 175 "android/java_handler_thread.h", 176 "android/java_runtime.cc", 177 "android/java_runtime.h", 178 "android/jni_android.cc", 179 "android/jni_android.h", 180 "android/jni_array.cc", 181 "android/jni_array.h", 182 "android/jni_registrar.cc", 183 "android/jni_registrar.h", 184 "android/jni_string.cc", 185 "android/jni_string.h", 186 "android/jni_utils.cc", 187 "android/jni_utils.h", 188 "android/jni_weak_ref.cc", 189 "android/jni_weak_ref.h", 190 "android/library_loader/library_load_from_apk_status_codes.h", 191 "android/library_loader/library_loader_hooks.cc", 192 "android/library_loader/library_loader_hooks.h", 193 "android/library_loader/library_prefetcher.cc", 194 "android/library_loader/library_prefetcher.h", 195 "android/locale_utils.cc", 196 "android/locale_utils.h", 197 "android/memory_pressure_listener_android.cc", 198 "android/memory_pressure_listener_android.h", 199 "android/path_service_android.cc", 200 "android/path_service_android.h", 201 "android/path_utils.cc", 202 "android/path_utils.h", 203 "android/record_histogram.cc", 204 "android/record_histogram.h", 205 "android/record_user_action.cc", 206 "android/record_user_action.h", 207 "android/scoped_java_ref.cc", 208 "android/scoped_java_ref.h", 209 "android/sys_utils.cc", 210 "android/sys_utils.h", 211 "android/thread_utils.h", 212 "android/trace_event_binding.cc", 213 "android/trace_event_binding.h", 214 "at_exit.cc", 215 "at_exit.h", 216 "atomic_ref_count.h", 217 "atomic_sequence_num.h", 218 "atomicops.h", 219 "atomicops_internals_portable.h", 220 "atomicops_internals_x86_msvc.h", 221 "auto_reset.h", 222 "barrier_closure.cc", 223 "barrier_closure.h", 224 "base64.cc", 225 "base64.h", 226 "base64url.cc", 227 "base64url.h", 228 "base_export.h", 229 "base_switches.h", 230 "big_endian.cc", 231 "big_endian.h", 232 "bind.h", 233 "bind_helpers.cc", 234 "bind_helpers.h", 235 "bind_internal.h", 236 "bit_cast.h", 237 "bits.h", 238 "build_time.cc", 239 "build_time.h", 240 "callback.h", 241 "callback_helpers.cc", 242 "callback_helpers.h", 243 "callback_internal.cc", 244 "callback_internal.h", 245 "cancelable_callback.h", 246 "command_line.cc", 247 "command_line.h", 248 "compiler_specific.h", 249 "containers/adapters.h", 250 "containers/hash_tables.h", 251 "containers/linked_list.h", 252 "containers/mru_cache.h", 253 "containers/scoped_ptr_hash_map.h", 254 "containers/small_map.h", 255 "containers/stack_container.h", 256 "cpu.cc", 257 "cpu.h", 258 "critical_closure.h", 259 "critical_closure_internal_ios.mm", 260 "debug/alias.cc", 261 "debug/alias.h", 262 "debug/asan_invalid_access.cc", 263 "debug/asan_invalid_access.h", 264 "debug/close_handle_hook_win.cc", 265 "debug/close_handle_hook_win.h", 266 "debug/crash_logging.cc", 267 "debug/crash_logging.h", 268 "debug/debugger.cc", 269 "debug/debugger.h", 270 "debug/debugger_posix.cc", 271 "debug/debugger_win.cc", 272 "debug/dump_without_crashing.cc", 273 "debug/dump_without_crashing.h", 274 "debug/gdi_debug_util_win.cc", 275 "debug/gdi_debug_util_win.h", 276 277 # This file depends on files from the "debug/allocator" target, 278 # but this target does not depend on "debug/allocator" (see 279 # allocator.gyp for details). 280 "debug/leak_annotations.h", 281 "debug/leak_tracker.h", 282 "debug/proc_maps_linux.cc", 283 "debug/proc_maps_linux.h", 284 "debug/profiler.cc", 285 "debug/profiler.h", 286 "debug/stack_trace.cc", 287 "debug/stack_trace.h", 288 "debug/stack_trace_android.cc", 289 "debug/stack_trace_posix.cc", 290 "debug/stack_trace_win.cc", 291 "debug/task_annotator.cc", 292 "debug/task_annotator.h", 293 "deferred_sequenced_task_runner.cc", 294 "deferred_sequenced_task_runner.h", 295 "environment.cc", 296 "environment.h", 297 "feature_list.cc", 298 "feature_list.h", 299 "file_descriptor_posix.h", 300 "file_version_info.h", 301 "file_version_info_mac.h", 302 "file_version_info_mac.mm", 303 "file_version_info_win.cc", 304 "file_version_info_win.h", 305 "files/dir_reader_fallback.h", 306 "files/dir_reader_linux.h", 307 "files/dir_reader_posix.h", 308 "files/file.cc", 309 "files/file_enumerator.cc", 310 "files/file_enumerator.h", 311 "files/file_enumerator_posix.cc", 312 "files/file_enumerator_win.cc", 313 "files/file_path.cc", 314 "files/file_path.h", 315 "files/file_path_constants.cc", 316 "files/file_path_watcher.cc", 317 "files/file_path_watcher.h", 318 "files/file_path_watcher_fsevents.cc", 319 "files/file_path_watcher_fsevents.h", 320 "files/file_path_watcher_kqueue.cc", 321 "files/file_path_watcher_kqueue.h", 322 "files/file_path_watcher_linux.cc", 323 "files/file_path_watcher_mac.cc", 324 "files/file_path_watcher_win.cc", 325 "files/file_posix.cc", 326 "files/file_proxy.cc", 327 "files/file_proxy.h", 328 "files/file_tracing.cc", 329 "files/file_tracing.h", 330 "files/file_util.cc", 331 "files/file_util.h", 332 "files/file_util_android.cc", 333 "files/file_util_linux.cc", 334 "files/file_util_mac.mm", 335 "files/file_util_posix.cc", 336 "files/file_util_proxy.cc", 337 "files/file_util_proxy.h", 338 "files/file_util_win.cc", 339 "files/file_win.cc", 340 "files/important_file_writer.cc", 341 "files/important_file_writer.h", 342 "files/memory_mapped_file.cc", 343 "files/memory_mapped_file.h", 344 "files/memory_mapped_file_posix.cc", 345 "files/memory_mapped_file_win.cc", 346 "files/scoped_file.cc", 347 "files/scoped_file.h", 348 "files/scoped_temp_dir.cc", 349 "files/scoped_temp_dir.h", 350 "format_macros.h", 351 "gtest_prod_util.h", 352 "guid.cc", 353 "guid.h", 354 "hash.cc", 355 "hash.h", 356 "id_map.h", 357 "ios/crb_protocol_observers.h", 358 "ios/crb_protocol_observers.mm", 359 "ios/device_util.h", 360 "ios/device_util.mm", 361 "ios/ios_util.h", 362 "ios/ios_util.mm", 363 "ios/ns_error_util.h", 364 "ios/ns_error_util.mm", 365 "ios/scoped_critical_action.h", 366 "ios/scoped_critical_action.mm", 367 "ios/weak_nsobject.h", 368 "ios/weak_nsobject.mm", 369 "json/json_file_value_serializer.cc", 370 "json/json_file_value_serializer.h", 371 "json/json_parser.cc", 372 "json/json_parser.h", 373 "json/json_reader.cc", 374 "json/json_reader.h", 375 "json/json_string_value_serializer.cc", 376 "json/json_string_value_serializer.h", 377 "json/json_value_converter.cc", 378 "json/json_value_converter.h", 379 "json/json_writer.cc", 380 "json/json_writer.h", 381 "json/string_escape.cc", 382 "json/string_escape.h", 383 "lazy_instance.cc", 384 "lazy_instance.h", 385 "linux_util.cc", 386 "linux_util.h", 387 "location.cc", 388 "location.h", 389 "logging.cc", 390 "logging.h", 391 "logging_win.cc", 392 "logging_win.h", 393 "mac/authorization_util.h", 394 "mac/authorization_util.mm", 395 "mac/bind_objc_block.h", 396 "mac/bundle_locations.h", 397 "mac/bundle_locations.mm", 398 "mac/call_with_eh_frame.cc", 399 "mac/call_with_eh_frame.h", 400 "mac/call_with_eh_frame_asm.S", 401 "mac/close_nocancel.cc", 402 "mac/cocoa_protocols.h", 403 "mac/dispatch_source_mach.cc", 404 "mac/dispatch_source_mach.h", 405 "mac/foundation_util.h", 406 "mac/foundation_util.mm", 407 "mac/launch_services_util.cc", 408 "mac/launch_services_util.h", 409 "mac/launchd.cc", 410 "mac/launchd.h", 411 "mac/mac_logging.h", 412 "mac/mac_logging.mm", 413 "mac/mac_util.h", 414 "mac/mac_util.mm", 415 "mac/mach_logging.cc", 416 "mac/mach_logging.h", 417 "mac/mach_port_broker.h", 418 "mac/mach_port_broker.mm", 419 "mac/mach_port_util.cc", 420 "mac/mach_port_util.h", 421 "mac/objc_property_releaser.h", 422 "mac/objc_property_releaser.mm", 423 "mac/os_crash_dumps.cc", 424 "mac/os_crash_dumps.h", 425 "mac/scoped_aedesc.h", 426 "mac/scoped_authorizationref.h", 427 "mac/scoped_block.h", 428 "mac/scoped_cftyperef.h", 429 "mac/scoped_dispatch_object.h", 430 "mac/scoped_ioobject.h", 431 "mac/scoped_ioplugininterface.h", 432 "mac/scoped_launch_data.h", 433 "mac/scoped_mach_port.cc", 434 "mac/scoped_mach_port.h", 435 "mac/scoped_mach_vm.cc", 436 "mac/scoped_mach_vm.h", 437 "mac/scoped_nsautorelease_pool.h", 438 "mac/scoped_nsautorelease_pool.mm", 439 "mac/scoped_nsobject.h", 440 "mac/scoped_nsobject.mm", 441 "mac/scoped_objc_class_swizzler.h", 442 "mac/scoped_objc_class_swizzler.mm", 443 "mac/scoped_sending_event.h", 444 "mac/scoped_sending_event.mm", 445 "mac/sdk_forward_declarations.h", 446 "mac/sdk_forward_declarations.mm", 447 "macros.h", 448 "md5.cc", 449 "md5.h", 450 "memory/aligned_memory.cc", 451 "memory/aligned_memory.h", 452 "memory/discardable_memory.cc", 453 "memory/discardable_memory.h", 454 "memory/discardable_memory_allocator.cc", 455 "memory/discardable_memory_allocator.h", 456 "memory/discardable_shared_memory.cc", 457 "memory/discardable_shared_memory.h", 458 "memory/free_deleter.h", 459 "memory/linked_ptr.h", 460 "memory/manual_constructor.h", 461 "memory/memory_pressure_listener.cc", 462 "memory/memory_pressure_listener.h", 463 "memory/memory_pressure_monitor.cc", 464 "memory/memory_pressure_monitor.h", 465 "memory/memory_pressure_monitor_chromeos.cc", 466 "memory/memory_pressure_monitor_chromeos.h", 467 "memory/memory_pressure_monitor_mac.cc", 468 "memory/memory_pressure_monitor_mac.h", 469 "memory/memory_pressure_monitor_win.cc", 470 "memory/memory_pressure_monitor_win.h", 471 "memory/ptr_util.h", 472 "memory/raw_scoped_refptr_mismatch_checker.h", 473 "memory/ref_counted.cc", 474 "memory/ref_counted.h", 475 "memory/ref_counted_delete_on_message_loop.h", 476 "memory/ref_counted_memory.cc", 477 "memory/ref_counted_memory.h", 478 "memory/scoped_policy.h", 479 "memory/scoped_vector.h", 480 "memory/shared_memory.h", 481 "memory/shared_memory_android.cc", 482 "memory/shared_memory_handle.h", 483 "memory/shared_memory_handle_mac.cc", 484 "memory/shared_memory_handle_win.cc", 485 "memory/shared_memory_mac.cc", 486 "memory/shared_memory_nacl.cc", 487 "memory/shared_memory_posix.cc", 488 "memory/shared_memory_win.cc", 489 "memory/singleton.cc", 490 "memory/singleton.h", 491 "memory/weak_ptr.cc", 492 "memory/weak_ptr.h", 493 "message_loop/incoming_task_queue.cc", 494 "message_loop/incoming_task_queue.h", 495 "message_loop/message_loop.cc", 496 "message_loop/message_loop.h", 497 "message_loop/message_loop_task_runner.cc", 498 "message_loop/message_loop_task_runner.h", 499 "message_loop/message_pump.cc", 500 "message_loop/message_pump.h", 501 "message_loop/message_pump_android.cc", 502 "message_loop/message_pump_android.h", 503 "message_loop/message_pump_default.cc", 504 "message_loop/message_pump_default.h", 505 "message_loop/message_pump_glib.cc", 506 "message_loop/message_pump_glib.h", 507 "message_loop/message_pump_io_ios.cc", 508 "message_loop/message_pump_io_ios.h", 509 "message_loop/message_pump_libevent.cc", 510 "message_loop/message_pump_libevent.h", 511 "message_loop/message_pump_mac.h", 512 "message_loop/message_pump_mac.mm", 513 "message_loop/message_pump_win.cc", 514 "message_loop/message_pump_win.h", 515 "metrics/bucket_ranges.cc", 516 "metrics/bucket_ranges.h", 517 "metrics/field_trial.cc", 518 "metrics/field_trial.h", 519 "metrics/histogram.cc", 520 "metrics/histogram.h", 521 "metrics/histogram_base.cc", 522 "metrics/histogram_base.h", 523 "metrics/histogram_delta_serialization.cc", 524 "metrics/histogram_delta_serialization.h", 525 "metrics/histogram_flattener.h", 526 "metrics/histogram_macros.h", 527 "metrics/histogram_samples.cc", 528 "metrics/histogram_samples.h", 529 "metrics/histogram_snapshot_manager.cc", 530 "metrics/histogram_snapshot_manager.h", 531 "metrics/metrics_hashes.cc", 532 "metrics/metrics_hashes.h", 533 "metrics/persistent_histogram_allocator.cc", 534 "metrics/persistent_histogram_allocator.h", 535 "metrics/persistent_memory_allocator.cc", 536 "metrics/persistent_memory_allocator.h", 537 "metrics/persistent_sample_map.cc", 538 "metrics/persistent_sample_map.h", 539 "metrics/sample_map.cc", 540 "metrics/sample_map.h", 541 "metrics/sample_vector.cc", 542 "metrics/sample_vector.h", 543 "metrics/sparse_histogram.cc", 544 "metrics/sparse_histogram.h", 545 "metrics/statistics_recorder.cc", 546 "metrics/statistics_recorder.h", 547 "metrics/user_metrics.cc", 548 "metrics/user_metrics.h", 549 "metrics/user_metrics_action.h", 550 "native_library.h", 551 "native_library_ios.mm", 552 "native_library_mac.mm", 553 "native_library_posix.cc", 554 "native_library_win.cc", 555 "nix/mime_util_xdg.cc", 556 "nix/mime_util_xdg.h", 557 "nix/xdg_util.cc", 558 "nix/xdg_util.h", 559 "numerics/safe_conversions.h", 560 "numerics/safe_conversions_impl.h", 561 "numerics/safe_math.h", 562 "numerics/safe_math_impl.h", 563 "observer_list.h", 564 "observer_list_threadsafe.h", 565 "optional.h", 566 "os_compat_android.cc", 567 "os_compat_android.h", 568 "os_compat_nacl.cc", 569 "os_compat_nacl.h", 570 "path_service.cc", 571 "path_service.h", 572 "pending_task.cc", 573 "pending_task.h", 574 "pickle.cc", 575 "pickle.h", 576 "posix/eintr_wrapper.h", 577 "posix/file_descriptor_shuffle.cc", 578 "posix/global_descriptors.cc", 579 "posix/global_descriptors.h", 580 "posix/safe_strerror.cc", 581 "posix/safe_strerror.h", 582 "posix/unix_domain_socket_linux.cc", 583 "posix/unix_domain_socket_linux.h", 584 "power_monitor/power_monitor.cc", 585 "power_monitor/power_monitor.h", 586 "power_monitor/power_monitor_device_source.cc", 587 "power_monitor/power_monitor_device_source.h", 588 "power_monitor/power_monitor_device_source_android.cc", 589 "power_monitor/power_monitor_device_source_android.h", 590 "power_monitor/power_monitor_device_source_chromeos.cc", 591 "power_monitor/power_monitor_device_source_ios.mm", 592 "power_monitor/power_monitor_device_source_mac.mm", 593 "power_monitor/power_monitor_device_source_posix.cc", 594 "power_monitor/power_monitor_device_source_win.cc", 595 "power_monitor/power_monitor_source.cc", 596 "power_monitor/power_monitor_source.h", 597 "power_monitor/power_observer.h", 598 "process/internal_linux.cc", 599 "process/internal_linux.h", 600 "process/kill.cc", 601 "process/kill.h", 602 "process/kill_mac.cc", 603 "process/kill_posix.cc", 604 "process/kill_win.cc", 605 "process/launch.cc", 606 "process/launch.h", 607 "process/launch_ios.cc", 608 "process/launch_mac.cc", 609 "process/launch_posix.cc", 610 "process/launch_win.cc", 611 "process/memory.cc", 612 "process/memory.h", 613 "process/memory_linux.cc", 614 "process/memory_mac.mm", 615 "process/memory_win.cc", 616 "process/port_provider_mac.cc", 617 "process/port_provider_mac.h", 618 "process/process.h", 619 "process/process_handle.cc", 620 621 #"process/process_handle_freebsd.cc", # Unused in Chromium build. 622 "process/process_handle_linux.cc", 623 "process/process_handle_mac.cc", 624 625 #"process/process_handle_openbsd.cc", # Unused in Chromium build. 626 "process/process_handle_posix.cc", 627 "process/process_handle_win.cc", 628 "process/process_info.h", 629 "process/process_info_linux.cc", 630 "process/process_info_mac.cc", 631 "process/process_info_win.cc", 632 "process/process_iterator.cc", 633 "process/process_iterator.h", 634 635 #"process/process_iterator_freebsd.cc", # Unused in Chromium build. 636 "process/process_iterator_linux.cc", 637 "process/process_iterator_mac.cc", 638 639 #"process/process_iterator_openbsd.cc", # Unused in Chromium build. 640 "process/process_iterator_win.cc", 641 "process/process_linux.cc", 642 "process/process_metrics.cc", 643 "process/process_metrics.h", 644 645 #"process/process_metrics_freebsd.cc", # Unused in Chromium build. 646 "process/process_metrics_ios.cc", 647 "process/process_metrics_linux.cc", 648 "process/process_metrics_mac.cc", 649 650 #"process/process_metrics_openbsd.cc", # Unused in Chromium build. 651 "process/process_metrics_posix.cc", 652 "process/process_metrics_win.cc", 653 "process/process_posix.cc", 654 "process/process_win.cc", 655 "profiler/native_stack_sampler.cc", 656 "profiler/native_stack_sampler.h", 657 "profiler/native_stack_sampler_posix.cc", 658 "profiler/native_stack_sampler_win.cc", 659 "profiler/scoped_profile.cc", 660 "profiler/scoped_profile.h", 661 "profiler/scoped_tracker.cc", 662 "profiler/scoped_tracker.h", 663 "profiler/stack_sampling_profiler.cc", 664 "profiler/stack_sampling_profiler.h", 665 "profiler/tracked_time.cc", 666 "profiler/tracked_time.h", 667 "rand_util.cc", 668 "rand_util.h", 669 "rand_util_nacl.cc", 670 "rand_util_posix.cc", 671 "rand_util_win.cc", 672 "run_loop.cc", 673 "run_loop.h", 674 "scoped_generic.h", 675 "scoped_native_library.cc", 676 "scoped_native_library.h", 677 "scoped_observer.h", 678 "sequence_checker.h", 679 "sequence_checker_impl.cc", 680 "sequence_checker_impl.h", 681 "sequenced_task_runner.cc", 682 "sequenced_task_runner.h", 683 "sequenced_task_runner_helpers.h", 684 "sha1.cc", 685 "sha1.h", 686 "single_thread_task_runner.h", 687 "stl_util.h", 688 "strings/latin1_string_conversions.cc", 689 "strings/latin1_string_conversions.h", 690 "strings/nullable_string16.cc", 691 "strings/nullable_string16.h", 692 "strings/pattern.cc", 693 "strings/pattern.h", 694 "strings/safe_sprintf.cc", 695 "strings/safe_sprintf.h", 696 "strings/string16.cc", 697 "strings/string16.h", 698 "strings/string_number_conversions.cc", 699 "strings/string_number_conversions.h", 700 "strings/string_piece.cc", 701 "strings/string_piece.h", 702 "strings/string_split.cc", 703 "strings/string_split.h", 704 "strings/string_tokenizer.h", 705 "strings/string_util.cc", 706 "strings/string_util.h", 707 "strings/string_util_constants.cc", 708 "strings/string_util_posix.h", 709 "strings/string_util_win.h", 710 "strings/stringize_macros.h", 711 "strings/stringprintf.cc", 712 "strings/stringprintf.h", 713 "strings/sys_string_conversions.h", 714 "strings/sys_string_conversions_mac.mm", 715 "strings/sys_string_conversions_posix.cc", 716 "strings/sys_string_conversions_win.cc", 717 "strings/utf_offset_string_conversions.cc", 718 "strings/utf_offset_string_conversions.h", 719 "strings/utf_string_conversion_utils.cc", 720 "strings/utf_string_conversion_utils.h", 721 "strings/utf_string_conversions.cc", 722 "strings/utf_string_conversions.h", 723 "supports_user_data.cc", 724 "supports_user_data.h", 725 "sync_socket.h", 726 "sync_socket_posix.cc", 727 "sync_socket_win.cc", 728 "synchronization/cancellation_flag.cc", 729 "synchronization/cancellation_flag.h", 730 "synchronization/condition_variable.h", 731 "synchronization/condition_variable_posix.cc", 732 "synchronization/condition_variable_win.cc", 733 "synchronization/lock.cc", 734 "synchronization/lock.h", 735 "synchronization/lock_impl.h", 736 "synchronization/lock_impl_posix.cc", 737 "synchronization/lock_impl_win.cc", 738 "synchronization/read_write_lock.h", 739 "synchronization/read_write_lock_nacl.cc", 740 "synchronization/read_write_lock_posix.cc", 741 "synchronization/read_write_lock_win.cc", 742 "synchronization/spin_wait.h", 743 "synchronization/waitable_event.h", 744 "synchronization/waitable_event_posix.cc", 745 "synchronization/waitable_event_watcher.h", 746 "synchronization/waitable_event_watcher_posix.cc", 747 "synchronization/waitable_event_watcher_win.cc", 748 "synchronization/waitable_event_win.cc", 749 "sys_byteorder.h", 750 "sys_info.cc", 751 "sys_info.h", 752 "sys_info_android.cc", 753 "sys_info_chromeos.cc", 754 755 #"sys_info_freebsd.cc", # Unused in Chromium build. 756 "sys_info_ios.mm", 757 "sys_info_linux.cc", 758 "sys_info_mac.mm", 759 760 #"sys_info_openbsd.cc", # Unused in Chromium build. 761 "sys_info_posix.cc", 762 "sys_info_win.cc", 763 "system_monitor/system_monitor.cc", 764 "system_monitor/system_monitor.h", 765 "task/cancelable_task_tracker.cc", 766 "task/cancelable_task_tracker.h", 767 "task_runner.cc", 768 "task_runner.h", 769 "task_runner_util.h", 770 "task_scheduler/delayed_task_manager.cc", 771 "task_scheduler/delayed_task_manager.h", 772 "task_scheduler/priority_queue.cc", 773 "task_scheduler/priority_queue.h", 774 "task_scheduler/scheduler_lock.h", 775 "task_scheduler/scheduler_lock_impl.cc", 776 "task_scheduler/scheduler_lock_impl.h", 777 "task_scheduler/scheduler_service_thread.cc", 778 "task_scheduler/scheduler_service_thread.h", 779 "task_scheduler/scheduler_worker.cc", 780 "task_scheduler/scheduler_worker.h", 781 "task_scheduler/scheduler_worker_pool.h", 782 "task_scheduler/scheduler_worker_pool_impl.cc", 783 "task_scheduler/scheduler_worker_pool_impl.h", 784 "task_scheduler/scheduler_worker_stack.cc", 785 "task_scheduler/scheduler_worker_stack.h", 786 "task_scheduler/sequence.cc", 787 "task_scheduler/sequence.h", 788 "task_scheduler/sequence_sort_key.cc", 789 "task_scheduler/sequence_sort_key.h", 790 "task_scheduler/task.cc", 791 "task_scheduler/task.h", 792 "task_scheduler/task_scheduler.cc", 793 "task_scheduler/task_scheduler.h", 794 "task_scheduler/task_scheduler_impl.cc", 795 "task_scheduler/task_scheduler_impl.h", 796 "task_scheduler/task_tracker.cc", 797 "task_scheduler/task_tracker.h", 798 "task_scheduler/task_traits.cc", 799 "task_scheduler/task_traits.h", 800 "template_util.h", 801 "third_party/dmg_fp/dmg_fp.h", 802 "third_party/dmg_fp/dtoa_wrapper.cc", 803 "third_party/dmg_fp/g_fmt.cc", 804 "third_party/icu/icu_utf.cc", 805 "third_party/icu/icu_utf.h", 806 "third_party/nspr/prtime.cc", 807 "third_party/nspr/prtime.h", 808 "third_party/superfasthash/superfasthash.c", 809 "threading/non_thread_safe.h", 810 "threading/non_thread_safe_impl.cc", 811 "threading/non_thread_safe_impl.h", 812 "threading/platform_thread.h", 813 "threading/platform_thread_android.cc", 814 "threading/platform_thread_internal_posix.cc", 815 "threading/platform_thread_internal_posix.h", 816 "threading/platform_thread_linux.cc", 817 "threading/platform_thread_mac.mm", 818 "threading/platform_thread_posix.cc", 819 "threading/platform_thread_win.cc", 820 "threading/post_task_and_reply_impl.cc", 821 "threading/post_task_and_reply_impl.h", 822 "threading/sequenced_task_runner_handle.cc", 823 "threading/sequenced_task_runner_handle.h", 824 "threading/sequenced_worker_pool.cc", 825 "threading/sequenced_worker_pool.h", 826 "threading/simple_thread.cc", 827 "threading/simple_thread.h", 828 "threading/thread.cc", 829 "threading/thread.h", 830 "threading/thread_checker.h", 831 "threading/thread_checker_impl.cc", 832 "threading/thread_checker_impl.h", 833 "threading/thread_collision_warner.cc", 834 "threading/thread_collision_warner.h", 835 "threading/thread_id_name_manager.cc", 836 "threading/thread_id_name_manager.h", 837 "threading/thread_local.h", 838 "threading/thread_local_android.cc", 839 "threading/thread_local_posix.cc", 840 "threading/thread_local_storage.cc", 841 "threading/thread_local_storage.h", 842 "threading/thread_local_storage_posix.cc", 843 "threading/thread_local_storage_win.cc", 844 "threading/thread_local_win.cc", 845 "threading/thread_restrictions.cc", 846 "threading/thread_restrictions.h", 847 "threading/thread_task_runner_handle.cc", 848 "threading/thread_task_runner_handle.h", 849 "threading/watchdog.cc", 850 "threading/watchdog.h", 851 "threading/worker_pool.cc", 852 "threading/worker_pool.h", 853 "threading/worker_pool_posix.cc", 854 "threading/worker_pool_posix.h", 855 "threading/worker_pool_win.cc", 856 "time/clock.cc", 857 "time/clock.h", 858 "time/default_clock.cc", 859 "time/default_clock.h", 860 "time/default_tick_clock.cc", 861 "time/default_tick_clock.h", 862 "time/tick_clock.cc", 863 "time/tick_clock.h", 864 "time/time.cc", 865 "time/time.h", 866 "time/time_mac.cc", 867 "time/time_posix.cc", 868 "time/time_win.cc", 869 "timer/elapsed_timer.cc", 870 "timer/elapsed_timer.h", 871 "timer/hi_res_timer_manager.h", 872 "timer/hi_res_timer_manager_posix.cc", 873 "timer/hi_res_timer_manager_win.cc", 874 "timer/mock_timer.cc", 875 "timer/mock_timer.h", 876 "timer/timer.cc", 877 "timer/timer.h", 878 "trace_event/blame_context.cc", 879 "trace_event/blame_context.h", 880 "trace_event/common/trace_event_common.h", 881 "trace_event/heap_profiler.h", 882 "trace_event/heap_profiler_allocation_context.cc", 883 "trace_event/heap_profiler_allocation_context.h", 884 "trace_event/heap_profiler_allocation_context_tracker.cc", 885 "trace_event/heap_profiler_allocation_context_tracker.h", 886 "trace_event/heap_profiler_allocation_register.cc", 887 "trace_event/heap_profiler_allocation_register.h", 888 "trace_event/heap_profiler_allocation_register_posix.cc", 889 "trace_event/heap_profiler_allocation_register_win.cc", 890 "trace_event/heap_profiler_heap_dump_writer.cc", 891 "trace_event/heap_profiler_heap_dump_writer.h", 892 "trace_event/heap_profiler_stack_frame_deduplicator.cc", 893 "trace_event/heap_profiler_stack_frame_deduplicator.h", 894 "trace_event/heap_profiler_type_name_deduplicator.cc", 895 "trace_event/heap_profiler_type_name_deduplicator.h", 896 "trace_event/java_heap_dump_provider_android.cc", 897 "trace_event/java_heap_dump_provider_android.h", 898 "trace_event/memory_allocator_dump.cc", 899 "trace_event/memory_allocator_dump.h", 900 "trace_event/memory_allocator_dump_guid.cc", 901 "trace_event/memory_allocator_dump_guid.h", 902 "trace_event/memory_dump_manager.cc", 903 "trace_event/memory_dump_manager.h", 904 "trace_event/memory_dump_provider.h", 905 "trace_event/memory_dump_request_args.cc", 906 "trace_event/memory_dump_request_args.h", 907 "trace_event/memory_dump_session_state.cc", 908 "trace_event/memory_dump_session_state.h", 909 "trace_event/memory_infra_background_whitelist.cc", 910 "trace_event/memory_infra_background_whitelist.h", 911 "trace_event/process_memory_dump.cc", 912 "trace_event/process_memory_dump.h", 913 "trace_event/process_memory_maps.cc", 914 "trace_event/process_memory_maps.h", 915 "trace_event/process_memory_totals.cc", 916 "trace_event/process_memory_totals.h", 917 "trace_event/trace_buffer.cc", 918 "trace_event/trace_buffer.h", 919 "trace_event/trace_config.cc", 920 "trace_event/trace_config.h", 921 "trace_event/trace_event.h", 922 "trace_event/trace_event_android.cc", 923 "trace_event/trace_event_argument.cc", 924 "trace_event/trace_event_argument.h", 925 "trace_event/trace_event_etw_export_win.cc", 926 "trace_event/trace_event_etw_export_win.h", 927 "trace_event/trace_event_impl.cc", 928 "trace_event/trace_event_impl.h", 929 "trace_event/trace_event_memory_overhead.cc", 930 "trace_event/trace_event_memory_overhead.h", 931 "trace_event/trace_event_synthetic_delay.cc", 932 "trace_event/trace_event_synthetic_delay.h", 933 "trace_event/trace_event_system_stats_monitor.cc", 934 "trace_event/trace_event_system_stats_monitor.h", 935 "trace_event/trace_log.cc", 936 "trace_event/trace_log.h", 937 "trace_event/trace_log_constants.cc", 938 "trace_event/trace_sampling_thread.cc", 939 "trace_event/trace_sampling_thread.h", 940 "trace_event/tracing_agent.cc", 941 "trace_event/tracing_agent.h", 942 "trace_event/winheap_dump_provider_win.cc", 943 "trace_event/winheap_dump_provider_win.h", 944 "tracked_objects.cc", 945 "tracked_objects.h", 946 "tracking_info.cc", 947 "tracking_info.h", 948 "tuple.h", 949 "value_conversions.cc", 950 "value_conversions.h", 951 "values.cc", 952 "values.h", 953 "version.cc", 954 "version.h", 955 "vlog.cc", 956 "vlog.h", 957 "win/enum_variant.cc", 958 "win/enum_variant.h", 959 "win/event_trace_consumer.h", 960 "win/event_trace_controller.cc", 961 "win/event_trace_controller.h", 962 "win/event_trace_provider.cc", 963 "win/event_trace_provider.h", 964 "win/i18n.cc", 965 "win/i18n.h", 966 "win/iat_patch_function.cc", 967 "win/iat_patch_function.h", 968 "win/iunknown_impl.cc", 969 "win/iunknown_impl.h", 970 "win/message_window.cc", 971 "win/message_window.h", 972 "win/object_watcher.cc", 973 "win/object_watcher.h", 974 "win/process_startup_helper.cc", 975 "win/process_startup_helper.h", 976 "win/registry.cc", 977 "win/registry.h", 978 "win/resource_util.cc", 979 "win/resource_util.h", 980 "win/scoped_bstr.cc", 981 "win/scoped_bstr.h", 982 "win/scoped_co_mem.h", 983 "win/scoped_com_initializer.h", 984 "win/scoped_comptr.h", 985 "win/scoped_gdi_object.h", 986 "win/scoped_handle.cc", 987 "win/scoped_handle.h", 988 "win/scoped_hdc.h", 989 "win/scoped_hglobal.h", 990 "win/scoped_process_information.cc", 991 "win/scoped_process_information.h", 992 "win/scoped_propvariant.h", 993 "win/scoped_select_object.h", 994 "win/scoped_variant.cc", 995 "win/scoped_variant.h", 996 "win/shortcut.cc", 997 "win/shortcut.h", 998 "win/startup_information.cc", 999 "win/startup_information.h", 1000 "win/wait_chain.cc", 1001 "win/wait_chain.h", 1002 "win/win_util.cc", 1003 "win/win_util.h", 1004 "win/windows_version.cc", 1005 "win/windows_version.h", 1006 "win/wrapped_window_proc.cc", 1007 "win/wrapped_window_proc.h", 1008 ] 1009 1010 defines = [] 1011 data = [] 1012 1013 configs += [ 1014 ":base_flags", 1015 ":base_implementation", 1016 "//base/allocator:allocator_shim_define", # for allocator_check.cc. 1017 "//build/config:precompiled_headers", 1018 ] 1019 1020 deps = [ 1021 "//base/allocator", 1022 "//base/allocator:features", 1023 "//base/third_party/dynamic_annotations", 1024 "//third_party/modp_b64", 1025 ] 1026 1027 public_deps = [ 1028 ":base_paths", 1029 ":base_static", 1030 ":build_date", 1031 ":debugging_flags", 1032 ] 1033 1034 # Needed for <atomic> if using newer C++ library than sysroot 1035 if (!use_sysroot && (is_android || is_linux)) { 1036 libs = [ "atomic" ] 1037 } 1038 1039 if (use_experimental_allocator_shim) { 1040 # The allocator shim is part of the base API. This is to allow clients of 1041 # base should to install hooks into the allocator path. 1042 public_deps += [ "//base/allocator:unified_allocator_shim" ] 1043 } 1044 1045 # Allow more direct string conversions on platforms with native utf8 1046 # strings 1047 if (is_mac || is_ios || is_chromeos || is_chromecast) { 1048 defines += [ "SYSTEM_NATIVE_UTF8" ] 1049 } 1050 1051 # Android. 1052 if (is_android) { 1053 sources -= [ 1054 "debug/stack_trace_posix.cc", 1055 "power_monitor/power_monitor_device_source_posix.cc", 1056 ] 1057 1058 # Android uses some Linux sources, put those back. 1059 set_sources_assignment_filter([]) 1060 sources += [ 1061 "debug/proc_maps_linux.cc", 1062 "files/file_path_watcher_linux.cc", 1063 "posix/unix_domain_socket_linux.cc", 1064 "process/internal_linux.cc", 1065 "process/memory_linux.cc", 1066 "process/process_handle_linux.cc", 1067 "process/process_iterator_linux.cc", 1068 "process/process_metrics_linux.cc", 1069 "sys_info_linux.cc", 1070 "trace_event/malloc_dump_provider.cc", 1071 "trace_event/malloc_dump_provider.h", 1072 ] 1073 set_sources_assignment_filter(sources_assignment_filter) 1074 1075 deps += [ 1076 ":base_jni_headers", 1077 "//third_party/android_tools:cpu_features", 1078 "//third_party/ashmem", 1079 ] 1080 1081 # Needs to be a public config so that dependent targets link against it as 1082 # well when doing a component build. 1083 public_configs = [ ":android_system_libs" ] 1084 } 1085 1086 # Chromeos. 1087 if (is_chromeos) { 1088 sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ] 1089 } 1090 1091 # NaCl. 1092 if (is_nacl) { 1093 # We reset sources_assignment_filter in order to explicitly include 1094 # the linux file (which would otherwise be filtered out). 1095 set_sources_assignment_filter([]) 1096 sources += [ 1097 "files/file_path_watcher_stub.cc", 1098 "process/process_metrics_nacl.cc", 1099 "sync_socket_nacl.cc", 1100 "threading/platform_thread_linux.cc", 1101 ] 1102 set_sources_assignment_filter(sources_assignment_filter) 1103 1104 sources -= [ 1105 "cpu.cc", 1106 "debug/crash_logging.cc", 1107 "debug/crash_logging.h", 1108 "debug/stack_trace.cc", 1109 "debug/stack_trace_posix.cc", 1110 "files/file_enumerator_posix.cc", 1111 "files/file_proxy.cc", 1112 "files/file_util_proxy.cc", 1113 "files/important_file_writer.cc", 1114 "files/important_file_writer.h", 1115 "files/scoped_temp_dir.cc", 1116 "memory/discardable_memory.cc", 1117 "memory/discardable_memory.h", 1118 "memory/discardable_memory_allocator.cc", 1119 "memory/discardable_memory_allocator.h", 1120 "memory/discardable_shared_memory.cc", 1121 "memory/discardable_shared_memory.h", 1122 "memory/shared_memory_posix.cc", 1123 "native_library_posix.cc", 1124 "path_service.cc", 1125 "process/kill.cc", 1126 "process/kill.h", 1127 "process/memory.cc", 1128 "process/memory.h", 1129 "process/process_iterator.cc", 1130 "process/process_iterator.h", 1131 "process/process_metrics.cc", 1132 "process/process_metrics_posix.cc", 1133 "process/process_posix.cc", 1134 "scoped_native_library.cc", 1135 "sync_socket_posix.cc", 1136 "synchronization/read_write_lock_posix.cc", 1137 "sys_info.cc", 1138 "sys_info_posix.cc", 1139 "trace_event/trace_event_system_stats_monitor.cc", 1140 ] 1141 1142 if (is_nacl_nonsfi) { 1143 set_sources_assignment_filter([]) 1144 sources += [ "posix/unix_domain_socket_linux.cc" ] 1145 set_sources_assignment_filter(sources_assignment_filter) 1146 sources -= [ "rand_util_nacl.cc" ] 1147 configs += [ ":nacl_nonsfi_warnings" ] 1148 } else { 1149 sources -= [ 1150 "files/file_util.cc", 1151 "files/file_util.h", 1152 "files/file_util_posix.cc", 1153 "json/json_file_value_serializer.cc", 1154 "json/json_file_value_serializer.h", 1155 "message_loop/message_pump_libevent.cc", 1156 "message_loop/message_pump_libevent.h", 1157 "process/kill_posix.cc", 1158 "process/launch.cc", 1159 "process/launch.h", 1160 "process/launch_posix.cc", 1161 "rand_util_posix.cc", 1162 ] 1163 } 1164 } else { 1165 # Remove NaCl stuff. 1166 sources -= [ 1167 "memory/shared_memory_nacl.cc", 1168 "os_compat_nacl.cc", 1169 "os_compat_nacl.h", 1170 "rand_util_nacl.cc", 1171 "synchronization/read_write_lock_nacl.cc", 1172 ] 1173 } 1174 1175 # Windows. 1176 if (is_win) { 1177 sources += [ 1178 "profiler/win32_stack_frame_unwinder.cc", 1179 "profiler/win32_stack_frame_unwinder.h", 1180 ] 1181 1182 sources -= [ 1183 "message_loop/message_pump_libevent.cc", 1184 "strings/string16.cc", 1185 ] 1186 1187 deps += [ 1188 "//base/trace_event/etw_manifest:chrome_events_win", 1189 "//base/win:base_win_features", 1190 ] 1191 1192 if (is_component_build) { 1193 # Copy the VS runtime DLLs into the isolate so that they don't have to be 1194 # preinstalled on the target machine. The debug runtimes have a "d" at 1195 # the end. 1196 if (is_debug) { 1197 vcrt_suffix = "d" 1198 } else { 1199 vcrt_suffix = "" 1200 } 1201 1202 # These runtime files are copied to the output directory by the 1203 # vs_toolchain script that runs as part of toolchain configuration. 1204 if (visual_studio_version == "2015") { 1205 data += [ 1206 "$root_out_dir/msvcp140${vcrt_suffix}.dll", 1207 "$root_out_dir/vccorlib140${vcrt_suffix}.dll", 1208 "$root_out_dir/vcruntime140${vcrt_suffix}.dll", 1209 1210 # Universal Windows 10 CRT files 1211 "$root_out_dir/api-ms-win-core-console-l1-1-0.dll", 1212 "$root_out_dir/api-ms-win-core-datetime-l1-1-0.dll", 1213 "$root_out_dir/api-ms-win-core-debug-l1-1-0.dll", 1214 "$root_out_dir/api-ms-win-core-errorhandling-l1-1-0.dll", 1215 "$root_out_dir/api-ms-win-core-file-l1-1-0.dll", 1216 "$root_out_dir/api-ms-win-core-file-l1-2-0.dll", 1217 "$root_out_dir/api-ms-win-core-file-l2-1-0.dll", 1218 "$root_out_dir/api-ms-win-core-handle-l1-1-0.dll", 1219 "$root_out_dir/api-ms-win-core-heap-l1-1-0.dll", 1220 "$root_out_dir/api-ms-win-core-interlocked-l1-1-0.dll", 1221 "$root_out_dir/api-ms-win-core-libraryloader-l1-1-0.dll", 1222 "$root_out_dir/api-ms-win-core-localization-l1-2-0.dll", 1223 "$root_out_dir/api-ms-win-core-memory-l1-1-0.dll", 1224 "$root_out_dir/api-ms-win-core-namedpipe-l1-1-0.dll", 1225 "$root_out_dir/api-ms-win-core-processenvironment-l1-1-0.dll", 1226 "$root_out_dir/api-ms-win-core-processthreads-l1-1-0.dll", 1227 "$root_out_dir/api-ms-win-core-processthreads-l1-1-1.dll", 1228 "$root_out_dir/api-ms-win-core-profile-l1-1-0.dll", 1229 "$root_out_dir/api-ms-win-core-rtlsupport-l1-1-0.dll", 1230 "$root_out_dir/api-ms-win-core-string-l1-1-0.dll", 1231 "$root_out_dir/api-ms-win-core-synch-l1-1-0.dll", 1232 "$root_out_dir/api-ms-win-core-synch-l1-2-0.dll", 1233 "$root_out_dir/api-ms-win-core-sysinfo-l1-1-0.dll", 1234 "$root_out_dir/api-ms-win-core-timezone-l1-1-0.dll", 1235 "$root_out_dir/api-ms-win-core-util-l1-1-0.dll", 1236 "$root_out_dir/api-ms-win-crt-conio-l1-1-0.dll", 1237 "$root_out_dir/api-ms-win-crt-convert-l1-1-0.dll", 1238 "$root_out_dir/api-ms-win-crt-environment-l1-1-0.dll", 1239 "$root_out_dir/api-ms-win-crt-filesystem-l1-1-0.dll", 1240 "$root_out_dir/api-ms-win-crt-heap-l1-1-0.dll", 1241 "$root_out_dir/api-ms-win-crt-locale-l1-1-0.dll", 1242 "$root_out_dir/api-ms-win-crt-math-l1-1-0.dll", 1243 "$root_out_dir/api-ms-win-crt-multibyte-l1-1-0.dll", 1244 "$root_out_dir/api-ms-win-crt-private-l1-1-0.dll", 1245 "$root_out_dir/api-ms-win-crt-process-l1-1-0.dll", 1246 "$root_out_dir/api-ms-win-crt-runtime-l1-1-0.dll", 1247 "$root_out_dir/api-ms-win-crt-stdio-l1-1-0.dll", 1248 "$root_out_dir/api-ms-win-crt-string-l1-1-0.dll", 1249 "$root_out_dir/api-ms-win-crt-time-l1-1-0.dll", 1250 "$root_out_dir/api-ms-win-crt-utility-l1-1-0.dll", 1251 "$root_out_dir/ucrtbase${vcrt_suffix}.dll", 1252 ] 1253 } else { 1254 data += [ 1255 "$root_out_dir/msvcp120${vcrt_suffix}.dll", 1256 "$root_out_dir/msvcr120${vcrt_suffix}.dll", 1257 ] 1258 } 1259 if (is_asan) { 1260 data += [ "//third_party/llvm-build/Release+Asserts/lib/clang/$clang_version/lib/windows/clang_rt.asan_dynamic-i386.dll" ] 1261 } 1262 } 1263 1264 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1265 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 1266 1267 libs = [ 1268 "cfgmgr32.lib", 1269 "powrprof.lib", 1270 "setupapi.lib", 1271 "userenv.lib", 1272 "winmm.lib", 1273 ] 1274 all_dependent_configs = [ ":base_win_linker_flags" ] 1275 } else if (!is_nacl || is_nacl_nonsfi) { 1276 # Non-Windows. 1277 deps += [ "//base/third_party/libevent" ] 1278 } 1279 1280 # Desktop Mac. 1281 if (is_mac) { 1282 sources += [ 1283 "trace_event/malloc_dump_provider.cc", 1284 "trace_event/malloc_dump_provider.h", 1285 ] 1286 libs = [ 1287 "ApplicationServices.framework", 1288 "AppKit.framework", 1289 "bsm", 1290 "CoreFoundation.framework", 1291 "IOKit.framework", 1292 "Security.framework", 1293 ] 1294 } 1295 1296 # Mac or iOS. 1297 if (is_mac || is_ios) { 1298 sources -= [ 1299 "memory/shared_memory_posix.cc", 1300 "native_library_posix.cc", 1301 "strings/sys_string_conversions_posix.cc", 1302 "threading/platform_thread_internal_posix.cc", 1303 ] 1304 } else { 1305 # Non-Mac/ios. 1306 sources -= [ 1307 "files/file_path_watcher_fsevents.cc", 1308 "files/file_path_watcher_fsevents.h", 1309 "files/file_path_watcher_kqueue.cc", 1310 "files/file_path_watcher_kqueue.h", 1311 ] 1312 } 1313 1314 # Linux. 1315 if (is_linux) { 1316 sources += [ 1317 "trace_event/malloc_dump_provider.cc", 1318 "trace_event/malloc_dump_provider.h", 1319 ] 1320 1321 if (is_asan || is_lsan || is_msan || is_tsan) { 1322 # For llvm-sanitizer. 1323 data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ] 1324 } 1325 1326 # TODO(brettw) this will need to be parameterized at some point. 1327 linux_configs = [] 1328 if (use_glib) { 1329 linux_configs += [ "//build/config/linux:glib" ] 1330 } 1331 1332 defines += [ "USE_SYMBOLIZE" ] 1333 1334 configs += linux_configs 1335 all_dependent_configs = linux_configs 1336 1337 # These dependencies are not required on Android, and in the case 1338 # of xdg_mime must be excluded due to licensing restrictions. 1339 deps += [ 1340 "//base/third_party/symbolize", 1341 "//base/third_party/xdg_mime", 1342 "//base/third_party/xdg_user_dirs", 1343 ] 1344 } else { 1345 # Non-Linux. 1346 sources -= [ 1347 "nix/mime_util_xdg.cc", 1348 "nix/mime_util_xdg.h", 1349 "nix/xdg_util.cc", 1350 "nix/xdg_util.h", 1351 ] 1352 1353 if (!is_android) { 1354 sources -= [ 1355 "linux_util.cc", 1356 "linux_util.h", 1357 ] 1358 } 1359 } 1360 1361 # iOS 1362 if (is_ios) { 1363 set_sources_assignment_filter([]) 1364 1365 sources -= [ 1366 "files/file_path_watcher.cc", 1367 "files/file_path_watcher.h", 1368 "files/file_path_watcher_fsevents.cc", 1369 "files/file_path_watcher_fsevents.h", 1370 "files/file_path_watcher_kqueue.cc", 1371 "files/file_path_watcher_kqueue.h", 1372 "memory/discardable_shared_memory.cc", 1373 "memory/discardable_shared_memory.h", 1374 "message_loop/message_pump_libevent.cc", 1375 "message_loop/message_pump_libevent.h", 1376 "process/kill.cc", 1377 "process/kill.h", 1378 "process/kill_posix.cc", 1379 "process/launch.cc", 1380 "process/launch.h", 1381 "process/launch_posix.cc", 1382 "process/memory.cc", 1383 "process/memory.h", 1384 "process/process_iterator.cc", 1385 "process/process_iterator.h", 1386 "process/process_metrics_posix.cc", 1387 "process/process_posix.cc", 1388 "sync_socket.h", 1389 "sync_socket_posix.cc", 1390 ] 1391 sources += [ 1392 "base_paths_mac.h", 1393 "base_paths_mac.mm", 1394 "file_version_info_mac.h", 1395 "file_version_info_mac.mm", 1396 "files/file_util_mac.mm", 1397 "mac/bundle_locations.h", 1398 "mac/bundle_locations.mm", 1399 "mac/call_with_eh_frame.cc", 1400 "mac/call_with_eh_frame.h", 1401 "mac/foundation_util.h", 1402 "mac/foundation_util.mm", 1403 "mac/mac_logging.h", 1404 "mac/mac_logging.mm", 1405 "mac/mach_logging.cc", 1406 "mac/mach_logging.h", 1407 "mac/objc_property_releaser.h", 1408 "mac/objc_property_releaser.mm", 1409 "mac/scoped_block.h", 1410 "mac/scoped_mach_port.cc", 1411 "mac/scoped_mach_port.h", 1412 "mac/scoped_mach_vm.cc", 1413 "mac/scoped_mach_vm.h", 1414 "mac/scoped_nsautorelease_pool.h", 1415 "mac/scoped_nsautorelease_pool.mm", 1416 "mac/scoped_nsobject.h", 1417 "mac/scoped_nsobject.mm", 1418 "mac/scoped_objc_class_swizzler.h", 1419 "mac/scoped_objc_class_swizzler.mm", 1420 "mac/scoped_typeref.h", 1421 "memory/shared_memory_posix.cc", 1422 "message_loop/message_pump_mac.h", 1423 "message_loop/message_pump_mac.mm", 1424 "process/memory_stubs.cc", 1425 "strings/sys_string_conversions_mac.mm", 1426 "threading/platform_thread_mac.mm", 1427 "time/time_mac.cc", 1428 ] 1429 1430 set_sources_assignment_filter(sources_assignment_filter) 1431 } 1432 1433 if (!use_glib) { 1434 sources -= [ 1435 "message_loop/message_pump_glib.cc", 1436 "message_loop/message_pump_glib.h", 1437 ] 1438 } 1439 1440 if (is_asan || is_lsan || is_msan || is_tsan) { 1441 data += [ "//tools/valgrind/asan/" ] 1442 if (is_win) { 1443 data += 1444 [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer.exe" ] 1445 } else { 1446 data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ] 1447 } 1448 } 1449 1450 configs += [ "//build/config/compiler:wexit_time_destructors" ] 1451 if (!is_debug) { 1452 configs -= [ "//build/config/compiler:default_optimization" ] 1453 configs += [ "//build/config/compiler:optimize_max" ] 1454 } 1455 1456 allow_circular_includes_from = public_deps 1457 } 1458 1459 buildflag_header("debugging_flags") { 1460 header = "debugging_flags.h" 1461 header_dir = "base/debug" 1462 flags = [ "ENABLE_PROFILING=$enable_profiling" ] 1463 } 1464 1465 # This is the subset of files from base that should not be used with a dynamic 1466 # library. Note that this library cannot depend on base because base depends on 1467 # base_static. 1468 static_library("base_static") { 1469 sources = [ 1470 "base_switches.cc", 1471 "base_switches.h", 1472 "win/pe_image.cc", 1473 "win/pe_image.h", 1474 ] 1475 1476 if (!is_debug) { 1477 configs -= [ "//build/config/compiler:default_optimization" ] 1478 configs += [ "//build/config/compiler:optimize_max" ] 1479 } 1480 } 1481 1482 component("i18n") { 1483 output_name = "base_i18n" 1484 sources = [ 1485 "i18n/base_i18n_export.h", 1486 "i18n/base_i18n_switches.cc", 1487 "i18n/base_i18n_switches.h", 1488 "i18n/bidi_line_iterator.cc", 1489 "i18n/bidi_line_iterator.h", 1490 "i18n/break_iterator.cc", 1491 "i18n/break_iterator.h", 1492 "i18n/case_conversion.cc", 1493 "i18n/case_conversion.h", 1494 "i18n/char_iterator.cc", 1495 "i18n/char_iterator.h", 1496 "i18n/file_util_icu.cc", 1497 "i18n/file_util_icu.h", 1498 "i18n/i18n_constants.cc", 1499 "i18n/i18n_constants.h", 1500 "i18n/icu_encoding_detection.cc", 1501 "i18n/icu_encoding_detection.h", 1502 "i18n/icu_string_conversions.cc", 1503 "i18n/icu_string_conversions.h", 1504 "i18n/icu_util.cc", 1505 "i18n/icu_util.h", 1506 "i18n/message_formatter.cc", 1507 "i18n/message_formatter.h", 1508 "i18n/number_formatting.cc", 1509 "i18n/number_formatting.h", 1510 "i18n/rtl.cc", 1511 "i18n/rtl.h", 1512 "i18n/streaming_utf8_validator.cc", 1513 "i18n/streaming_utf8_validator.h", 1514 "i18n/string_compare.cc", 1515 "i18n/string_compare.h", 1516 "i18n/string_search.cc", 1517 "i18n/string_search.h", 1518 "i18n/time_formatting.cc", 1519 "i18n/time_formatting.h", 1520 "i18n/timezone.cc", 1521 "i18n/timezone.h", 1522 "i18n/utf8_validator_tables.cc", 1523 "i18n/utf8_validator_tables.h", 1524 ] 1525 defines = [ "BASE_I18N_IMPLEMENTATION" ] 1526 configs += [ "//build/config/compiler:wexit_time_destructors" ] 1527 public_deps = [ 1528 "//third_party/icu", 1529 ] 1530 deps = [ 1531 ":base", 1532 "//base/third_party/dynamic_annotations", 1533 ] 1534 1535 if (!is_debug) { 1536 configs -= [ "//build/config/compiler:default_optimization" ] 1537 configs += [ "//build/config/compiler:optimize_max" ] 1538 } 1539 1540 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1541 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 1542 1543 if (is_mac) { 1544 libs = [ "CoreFoundation.framework" ] 1545 } 1546 } 1547 1548 test("base_perftests") { 1549 sources = [ 1550 "message_loop/message_pump_perftest.cc", 1551 1552 # "test/run_all_unittests.cc", 1553 "threading/thread_perftest.cc", 1554 ] 1555 deps = [ 1556 ":base", 1557 "//base/test:test_support", 1558 "//base/test:test_support_perf", 1559 "//testing/gtest", 1560 "//testing/perf", 1561 ] 1562 1563 if (is_android) { 1564 deps += [ "//testing/android/native_test:native_test_native_code" ] 1565 } 1566 } 1567 1568 test("base_i18n_perftests") { 1569 sources = [ 1570 "i18n/streaming_utf8_validator_perftest.cc", 1571 ] 1572 deps = [ 1573 ":base", 1574 ":i18n", 1575 "//base/test:test_support", 1576 "//base/test:test_support_perf", 1577 "//testing/gtest", 1578 ] 1579 } 1580 1581 if (!is_ios) { 1582 executable("build_utf8_validator_tables") { 1583 sources = [ 1584 "i18n/build_utf8_validator_tables.cc", 1585 ] 1586 deps = [ 1587 ":base", 1588 "//build/config/sanitizers:deps", 1589 "//build/win:default_exe_manifest", 1590 "//third_party/icu:icuuc", 1591 ] 1592 } 1593 1594 executable("check_example") { 1595 sources = [ 1596 "check_example.cc", 1597 ] 1598 deps = [ 1599 ":base", 1600 "//build/config/sanitizers:deps", 1601 "//build/win:default_exe_manifest", 1602 ] 1603 } 1604 } 1605 1606 source_set("message_loop_tests") { 1607 testonly = true 1608 sources = [ 1609 "message_loop/message_loop_test.cc", 1610 "message_loop/message_loop_test.h", 1611 ] 1612 1613 deps = [ 1614 ":base", 1615 "//testing/gtest", 1616 ] 1617 } 1618 1619 if (is_win) { 1620 # Target to manually rebuild pe_image_test.dll which is checked into 1621 # base/test/data/pe_image. 1622 shared_library("pe_image_test") { 1623 sources = [ 1624 "win/pe_image_test.cc", 1625 ] 1626 ldflags = [ 1627 "/DELAYLOAD:cfgmgr32.dll", 1628 "/DELAYLOAD:shell32.dll", 1629 "/SUBSYSTEM:WINDOWS", 1630 ] 1631 libs = [ 1632 "cfgmgr32.lib", 1633 "shell32.lib", 1634 ] 1635 deps = [ 1636 "//build/config/sanitizers:deps", 1637 ] 1638 } 1639 1640 loadable_module("scoped_handle_test_dll") { 1641 sources = [ 1642 "win/scoped_handle_test_dll.cc", 1643 ] 1644 deps = [ 1645 ":base", 1646 "//base/win:base_win_features", 1647 ] 1648 } 1649 1650 if (current_cpu == "x64") { 1651 # Must be a shared library so that it can be unloaded during testing. 1652 shared_library("base_profiler_test_support_library") { 1653 sources = [ 1654 "profiler/test_support_library.cc", 1655 ] 1656 deps = [ 1657 "//build/config/sanitizers:deps", 1658 ] 1659 } 1660 } 1661 } 1662 1663 bundle_data("base_unittests_bundle_data") { 1664 testonly = true 1665 sources = [ 1666 "test/data/file_util/binary_file.bin", 1667 "test/data/file_util/binary_file_diff.bin", 1668 "test/data/file_util/binary_file_same.bin", 1669 "test/data/file_util/blank_line.txt", 1670 "test/data/file_util/blank_line_crlf.txt", 1671 "test/data/file_util/crlf.txt", 1672 "test/data/file_util/different.txt", 1673 "test/data/file_util/different_first.txt", 1674 "test/data/file_util/different_last.txt", 1675 "test/data/file_util/empty1.txt", 1676 "test/data/file_util/empty2.txt", 1677 "test/data/file_util/first1.txt", 1678 "test/data/file_util/first2.txt", 1679 "test/data/file_util/original.txt", 1680 "test/data/file_util/same.txt", 1681 "test/data/file_util/same_length.txt", 1682 "test/data/file_util/shortened.txt", 1683 "test/data/json/bom_feff.json", 1684 "test/data/serializer_nested_test.json", 1685 "test/data/serializer_test.json", 1686 "test/data/serializer_test_nowhitespace.json", 1687 ] 1688 outputs = [ 1689 "{{bundle_resources_dir}}/" + 1690 "{{source_root_relative_dir}}/{{source_file_part}}", 1691 ] 1692 } 1693 1694 if (is_ios || is_mac) { 1695 source_set("base_unittests_arc") { 1696 testonly = true 1697 set_sources_assignment_filter([]) 1698 sources = [ 1699 "mac/bind_objc_block_unittest_arc.mm", 1700 "mac/scoped_nsobject_unittest_arc.mm", 1701 ] 1702 set_sources_assignment_filter(sources_assignment_filter) 1703 configs += [ "//build/config/compiler:enable_arc" ] 1704 deps = [ 1705 ":base", 1706 "//testing/gtest", 1707 ] 1708 } 1709 } 1710 1711 test("base_unittests") { 1712 sources = [ 1713 "allocator/tcmalloc_unittest.cc", 1714 "android/application_status_listener_unittest.cc", 1715 "android/content_uri_utils_unittest.cc", 1716 "android/jni_android_unittest.cc", 1717 "android/jni_array_unittest.cc", 1718 "android/jni_string_unittest.cc", 1719 "android/library_loader/library_prefetcher_unittest.cc", 1720 "android/path_utils_unittest.cc", 1721 "android/scoped_java_ref_unittest.cc", 1722 "android/sys_utils_unittest.cc", 1723 "at_exit_unittest.cc", 1724 "atomicops_unittest.cc", 1725 "barrier_closure_unittest.cc", 1726 "base64_unittest.cc", 1727 "base64url_unittest.cc", 1728 "big_endian_unittest.cc", 1729 "bind_unittest.cc", 1730 "bit_cast_unittest.cc", 1731 "bits_unittest.cc", 1732 "build_time_unittest.cc", 1733 "callback_helpers_unittest.cc", 1734 "callback_list_unittest.cc", 1735 "callback_unittest.cc", 1736 "cancelable_callback_unittest.cc", 1737 "command_line_unittest.cc", 1738 "containers/adapters_unittest.cc", 1739 "containers/hash_tables_unittest.cc", 1740 "containers/linked_list_unittest.cc", 1741 "containers/mru_cache_unittest.cc", 1742 "containers/scoped_ptr_hash_map_unittest.cc", 1743 "containers/small_map_unittest.cc", 1744 "containers/stack_container_unittest.cc", 1745 "cpu_unittest.cc", 1746 "debug/crash_logging_unittest.cc", 1747 "debug/debugger_unittest.cc", 1748 "debug/leak_tracker_unittest.cc", 1749 "debug/proc_maps_linux_unittest.cc", 1750 "debug/stack_trace_unittest.cc", 1751 "debug/task_annotator_unittest.cc", 1752 "deferred_sequenced_task_runner_unittest.cc", 1753 "environment_unittest.cc", 1754 "feature_list_unittest.cc", 1755 "file_version_info_win_unittest.cc", 1756 "files/dir_reader_posix_unittest.cc", 1757 "files/file_locking_unittest.cc", 1758 "files/file_path_unittest.cc", 1759 "files/file_path_watcher_unittest.cc", 1760 "files/file_proxy_unittest.cc", 1761 "files/file_unittest.cc", 1762 "files/file_util_proxy_unittest.cc", 1763 "files/file_util_unittest.cc", 1764 "files/important_file_writer_unittest.cc", 1765 "files/memory_mapped_file_unittest.cc", 1766 "files/scoped_temp_dir_unittest.cc", 1767 "gmock_unittest.cc", 1768 "guid_unittest.cc", 1769 "hash_unittest.cc", 1770 "i18n/break_iterator_unittest.cc", 1771 "i18n/case_conversion_unittest.cc", 1772 "i18n/char_iterator_unittest.cc", 1773 "i18n/file_util_icu_unittest.cc", 1774 "i18n/icu_string_conversions_unittest.cc", 1775 "i18n/message_formatter_unittest.cc", 1776 "i18n/number_formatting_unittest.cc", 1777 "i18n/rtl_unittest.cc", 1778 "i18n/streaming_utf8_validator_unittest.cc", 1779 "i18n/string_search_unittest.cc", 1780 "i18n/time_formatting_unittest.cc", 1781 "i18n/timezone_unittest.cc", 1782 "id_map_unittest.cc", 1783 "ios/device_util_unittest.mm", 1784 "ios/weak_nsobject_unittest.mm", 1785 "json/json_parser_unittest.cc", 1786 "json/json_reader_unittest.cc", 1787 "json/json_value_converter_unittest.cc", 1788 "json/json_value_serializer_unittest.cc", 1789 "json/json_writer_unittest.cc", 1790 "json/string_escape_unittest.cc", 1791 "lazy_instance_unittest.cc", 1792 "logging_unittest.cc", 1793 "mac/bind_objc_block_unittest.mm", 1794 "mac/call_with_eh_frame_unittest.mm", 1795 "mac/dispatch_source_mach_unittest.cc", 1796 "mac/foundation_util_unittest.mm", 1797 "mac/mac_util_unittest.mm", 1798 "mac/mach_port_broker_unittest.cc", 1799 "mac/objc_property_releaser_unittest.mm", 1800 "mac/scoped_nsobject_unittest.mm", 1801 "mac/scoped_objc_class_swizzler_unittest.mm", 1802 "mac/scoped_sending_event_unittest.mm", 1803 "md5_unittest.cc", 1804 "memory/aligned_memory_unittest.cc", 1805 "memory/discardable_shared_memory_unittest.cc", 1806 "memory/linked_ptr_unittest.cc", 1807 "memory/memory_pressure_listener_unittest.cc", 1808 "memory/memory_pressure_monitor_chromeos_unittest.cc", 1809 "memory/memory_pressure_monitor_mac_unittest.cc", 1810 "memory/memory_pressure_monitor_win_unittest.cc", 1811 "memory/ptr_util_unittest.cc", 1812 "memory/ref_counted_memory_unittest.cc", 1813 "memory/ref_counted_unittest.cc", 1814 "memory/scoped_vector_unittest.cc", 1815 "memory/shared_memory_mac_unittest.cc", 1816 "memory/shared_memory_unittest.cc", 1817 "memory/shared_memory_win_unittest.cc", 1818 "memory/singleton_unittest.cc", 1819 "memory/weak_ptr_unittest.cc", 1820 "message_loop/message_loop_task_runner_unittest.cc", 1821 "message_loop/message_loop_unittest.cc", 1822 "message_loop/message_pump_glib_unittest.cc", 1823 "message_loop/message_pump_io_ios_unittest.cc", 1824 "metrics/bucket_ranges_unittest.cc", 1825 "metrics/field_trial_unittest.cc", 1826 "metrics/histogram_base_unittest.cc", 1827 "metrics/histogram_delta_serialization_unittest.cc", 1828 "metrics/histogram_macros_unittest.cc", 1829 "metrics/histogram_snapshot_manager_unittest.cc", 1830 "metrics/histogram_unittest.cc", 1831 "metrics/metrics_hashes_unittest.cc", 1832 "metrics/persistent_histogram_allocator_unittest.cc", 1833 "metrics/persistent_memory_allocator_unittest.cc", 1834 "metrics/persistent_sample_map_unittest.cc", 1835 "metrics/sample_map_unittest.cc", 1836 "metrics/sample_vector_unittest.cc", 1837 "metrics/sparse_histogram_unittest.cc", 1838 "metrics/statistics_recorder_unittest.cc", 1839 "native_library_unittest.cc", 1840 "numerics/safe_numerics_unittest.cc", 1841 "observer_list_unittest.cc", 1842 "optional_unittest.cc", 1843 "os_compat_android_unittest.cc", 1844 "path_service_unittest.cc", 1845 "pickle_unittest.cc", 1846 "posix/file_descriptor_shuffle_unittest.cc", 1847 "posix/unix_domain_socket_linux_unittest.cc", 1848 "power_monitor/power_monitor_unittest.cc", 1849 "process/memory_unittest.cc", 1850 "process/memory_unittest_mac.h", 1851 "process/memory_unittest_mac.mm", 1852 "process/process_metrics_unittest.cc", 1853 "process/process_metrics_unittest_ios.cc", 1854 "process/process_unittest.cc", 1855 "process/process_util_unittest.cc", 1856 "profiler/stack_sampling_profiler_unittest.cc", 1857 "profiler/tracked_time_unittest.cc", 1858 "rand_util_unittest.cc", 1859 "run_loop_unittest.cc", 1860 "scoped_clear_errno_unittest.cc", 1861 "scoped_generic_unittest.cc", 1862 "scoped_native_library_unittest.cc", 1863 "security_unittest.cc", 1864 "sequence_checker_unittest.cc", 1865 "sha1_unittest.cc", 1866 "stl_util_unittest.cc", 1867 "strings/nullable_string16_unittest.cc", 1868 "strings/pattern_unittest.cc", 1869 "strings/safe_sprintf_unittest.cc", 1870 "strings/string16_unittest.cc", 1871 "strings/string_number_conversions_unittest.cc", 1872 "strings/string_piece_unittest.cc", 1873 "strings/string_split_unittest.cc", 1874 "strings/string_tokenizer_unittest.cc", 1875 "strings/string_util_unittest.cc", 1876 "strings/stringize_macros_unittest.cc", 1877 "strings/stringprintf_unittest.cc", 1878 "strings/sys_string_conversions_mac_unittest.mm", 1879 "strings/sys_string_conversions_unittest.cc", 1880 "strings/utf_offset_string_conversions_unittest.cc", 1881 "strings/utf_string_conversions_unittest.cc", 1882 "supports_user_data_unittest.cc", 1883 "sync_socket_unittest.cc", 1884 "synchronization/cancellation_flag_unittest.cc", 1885 "synchronization/condition_variable_unittest.cc", 1886 "synchronization/lock_unittest.cc", 1887 "synchronization/read_write_lock_unittest.cc", 1888 "synchronization/waitable_event_unittest.cc", 1889 "synchronization/waitable_event_watcher_unittest.cc", 1890 "sys_byteorder_unittest.cc", 1891 "sys_info_unittest.cc", 1892 "system_monitor/system_monitor_unittest.cc", 1893 "task/cancelable_task_tracker_unittest.cc", 1894 "task_runner_util_unittest.cc", 1895 "task_scheduler/delayed_task_manager_unittest.cc", 1896 "task_scheduler/priority_queue_unittest.cc", 1897 "task_scheduler/scheduler_lock_unittest.cc", 1898 "task_scheduler/scheduler_service_thread_unittest.cc", 1899 "task_scheduler/scheduler_worker_pool_impl_unittest.cc", 1900 "task_scheduler/scheduler_worker_stack_unittest.cc", 1901 "task_scheduler/scheduler_worker_unittest.cc", 1902 "task_scheduler/sequence_sort_key_unittest.cc", 1903 "task_scheduler/sequence_unittest.cc", 1904 "task_scheduler/task_scheduler_impl_unittest.cc", 1905 "task_scheduler/task_tracker_unittest.cc", 1906 "task_scheduler/test_task_factory.cc", 1907 "task_scheduler/test_task_factory.h", 1908 "task_scheduler/test_utils.h", 1909 "template_util_unittest.cc", 1910 "test/histogram_tester_unittest.cc", 1911 "test/icu_test_util.cc", 1912 "test/icu_test_util.h", 1913 "test/test_pending_task_unittest.cc", 1914 "test/test_reg_util_win_unittest.cc", 1915 "test/trace_event_analyzer_unittest.cc", 1916 "test/user_action_tester_unittest.cc", 1917 "threading/non_thread_safe_unittest.cc", 1918 "threading/platform_thread_unittest.cc", 1919 "threading/sequenced_task_runner_handle_unittest.cc", 1920 "threading/sequenced_worker_pool_unittest.cc", 1921 "threading/simple_thread_unittest.cc", 1922 "threading/thread_checker_unittest.cc", 1923 "threading/thread_collision_warner_unittest.cc", 1924 "threading/thread_id_name_manager_unittest.cc", 1925 "threading/thread_local_storage_unittest.cc", 1926 "threading/thread_local_unittest.cc", 1927 "threading/thread_unittest.cc", 1928 "threading/watchdog_unittest.cc", 1929 "threading/worker_pool_posix_unittest.cc", 1930 "threading/worker_pool_unittest.cc", 1931 "time/pr_time_unittest.cc", 1932 "time/time_unittest.cc", 1933 "time/time_win_unittest.cc", 1934 "timer/hi_res_timer_manager_unittest.cc", 1935 "timer/mock_timer_unittest.cc", 1936 "timer/timer_unittest.cc", 1937 "tools_sanity_unittest.cc", 1938 "trace_event/blame_context_unittest.cc", 1939 "trace_event/heap_profiler_allocation_context_tracker_unittest.cc", 1940 "trace_event/heap_profiler_allocation_register_unittest.cc", 1941 "trace_event/heap_profiler_heap_dump_writer_unittest.cc", 1942 "trace_event/heap_profiler_stack_frame_deduplicator_unittest.cc", 1943 "trace_event/heap_profiler_type_name_deduplicator_unittest.cc", 1944 "trace_event/java_heap_dump_provider_android_unittest.cc", 1945 "trace_event/memory_allocator_dump_unittest.cc", 1946 "trace_event/memory_dump_manager_unittest.cc", 1947 "trace_event/process_memory_dump_unittest.cc", 1948 "trace_event/trace_config_unittest.cc", 1949 "trace_event/trace_event_argument_unittest.cc", 1950 "trace_event/trace_event_synthetic_delay_unittest.cc", 1951 "trace_event/trace_event_system_stats_monitor_unittest.cc", 1952 "trace_event/trace_event_unittest.cc", 1953 "trace_event/winheap_dump_provider_win_unittest.cc", 1954 "tracked_objects_unittest.cc", 1955 "tuple_unittest.cc", 1956 "values_unittest.cc", 1957 "version_unittest.cc", 1958 "vlog_unittest.cc", 1959 "win/dllmain.cc", 1960 "win/enum_variant_unittest.cc", 1961 "win/event_trace_consumer_unittest.cc", 1962 "win/event_trace_controller_unittest.cc", 1963 "win/event_trace_provider_unittest.cc", 1964 "win/i18n_unittest.cc", 1965 "win/iunknown_impl_unittest.cc", 1966 "win/message_window_unittest.cc", 1967 "win/object_watcher_unittest.cc", 1968 "win/pe_image_unittest.cc", 1969 "win/registry_unittest.cc", 1970 "win/scoped_bstr_unittest.cc", 1971 "win/scoped_comptr_unittest.cc", 1972 "win/scoped_handle_unittest.cc", 1973 "win/scoped_process_information_unittest.cc", 1974 "win/scoped_variant_unittest.cc", 1975 "win/shortcut_unittest.cc", 1976 "win/startup_information_unittest.cc", 1977 "win/wait_chain_unittest.cc", 1978 "win/win_util_unittest.cc", 1979 "win/windows_version_unittest.cc", 1980 "win/wrapped_window_proc_unittest.cc", 1981 ] 1982 1983 defines = [] 1984 1985 deps = [ 1986 ":base", 1987 ":i18n", 1988 ":message_loop_tests", 1989 "//base/test:run_all_unittests", 1990 "//base/test:test_support", 1991 "//base/third_party/dynamic_annotations", 1992 "//testing/gmock", 1993 "//testing/gtest", 1994 "//third_party/icu", 1995 ] 1996 1997 if (is_ios || is_mac) { 1998 deps += [ ":base_unittests_arc" ] 1999 } 2000 2001 public_deps = [ 2002 ":base_unittests_bundle_data", 2003 ] 2004 2005 # Some unittests depend on the ALLOCATOR_SHIM macro. 2006 configs += [ "//base/allocator:allocator_shim_define" ] 2007 2008 data = [ 2009 "test/data/", 2010 ] 2011 2012 # Allow more direct string conversions on platforms with native utf8 2013 # strings 2014 if (is_mac || is_ios || is_chromeos || is_chromecast) { 2015 defines += [ "SYSTEM_NATIVE_UTF8" ] 2016 } 2017 2018 if (is_android) { 2019 deps += [ 2020 ":base_java", 2021 ":base_java_unittest_support", 2022 "//base/android/jni_generator:jni_generator_tests", 2023 ] 2024 } 2025 2026 if (is_ios) { 2027 sources -= [ 2028 "files/file_locking_unittest.cc", 2029 "files/file_path_watcher_unittest.cc", 2030 "memory/discardable_shared_memory_unittest.cc", 2031 "memory/shared_memory_unittest.cc", 2032 "process/memory_unittest.cc", 2033 "process/process_unittest.cc", 2034 "process/process_util_unittest.cc", 2035 "sync_socket_unittest.cc", 2036 ] 2037 2038 # Pull in specific Mac files for iOS (which have been filtered out by file 2039 # name rules). 2040 set_sources_assignment_filter([]) 2041 sources += [ 2042 "mac/bind_objc_block_unittest.mm", 2043 "mac/foundation_util_unittest.mm", 2044 "mac/objc_property_releaser_unittest.mm", 2045 "mac/scoped_nsobject_unittest.mm", 2046 "strings/sys_string_conversions_mac_unittest.mm", 2047 ] 2048 set_sources_assignment_filter(sources_assignment_filter) 2049 2050 # TODO(GYP): dep on copy_test_data_ios action. 2051 } 2052 2053 if (is_mac) { 2054 libs = [ 2055 "CoreFoundation.framework", 2056 "Foundation.framework", 2057 ] 2058 } 2059 2060 if (is_linux) { 2061 if (is_desktop_linux) { 2062 sources += [ "nix/xdg_util_unittest.cc" ] 2063 } 2064 2065 deps += [ "//base/test:malloc_wrapper" ] 2066 2067 if (use_glib) { 2068 configs += [ "//build/config/linux:glib" ] 2069 } 2070 2071 if (!is_component_build) { 2072 # Set rpath to find libmalloc_wrapper.so even in a non-component build. 2073 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] 2074 } 2075 } 2076 2077 if (!use_glib) { 2078 sources -= [ "message_loop/message_pump_glib_unittest.cc" ] 2079 } 2080 2081 if (is_posix && !is_ios) { 2082 sources += [ "message_loop/message_pump_libevent_unittest.cc" ] 2083 deps += [ "//base/third_party/libevent" ] 2084 } 2085 2086 if (is_android) { 2087 deps += [ "//testing/android/native_test:native_test_native_code" ] 2088 set_sources_assignment_filter([]) 2089 sources += [ 2090 "debug/proc_maps_linux_unittest.cc", 2091 "trace_event/trace_event_android_unittest.cc", 2092 ] 2093 set_sources_assignment_filter(sources_assignment_filter) 2094 } 2095 2096 if (is_win) { 2097 deps += [ "//base:scoped_handle_test_dll" ] 2098 if (current_cpu == "x64") { 2099 sources += [ "profiler/win32_stack_frame_unwinder_unittest.cc" ] 2100 deps += [ ":base_profiler_test_support_library" ] 2101 } 2102 } 2103 2104 if (use_experimental_allocator_shim) { 2105 sources += [ "allocator/allocator_shim_unittest.cc" ] 2106 } 2107 2108 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 2109 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 2110 2111 # Symbols for crashes when running tests on swarming. 2112 if (symbol_level > 0) { 2113 if (is_win) { 2114 data += [ "$root_out_dir/base_unittests.exe.pdb" ] 2115 } else if (is_mac) { 2116 # TODO(crbug.com/330301): make this conditional on mac_strip_release. 2117 # data += [ "$root_out_dir/base_unittests.dSYM/" ] 2118 } 2119 } 2120 2121 if (use_cfi_cast) { 2122 # TODO(krasin): remove CFI_CAST_CHECK, see https://crbug.com/626794. 2123 defines += [ "CFI_CAST_CHECK" ] 2124 } 2125 } 2126 2127 action("build_date") { 2128 script = "//build/write_build_date_header.py" 2129 2130 # Force recalculation if there's been a change. 2131 inputs = [ 2132 "//build/util/LASTCHANGE", 2133 ] 2134 outputs = [ 2135 "$target_gen_dir/generated_build_date.h", 2136 ] 2137 2138 args = 2139 [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ] 2140 2141 if (is_official_build) { 2142 args += [ "official" ] 2143 } else { 2144 args += [ "default" ] 2145 } 2146 2147 if (override_build_date != "N/A") { 2148 args += [ override_build_date ] 2149 } 2150 } 2151 2152 if (enable_nocompile_tests) { 2153 nocompile_test("base_nocompile_tests") { 2154 sources = [ 2155 "bind_unittest.nc", 2156 "callback_list_unittest.nc", 2157 "callback_unittest.nc", 2158 "memory/weak_ptr_unittest.nc", 2159 ] 2160 2161 deps = [ 2162 ":base", 2163 "//base/test:run_all_unittests", 2164 "//testing/gtest", 2165 ] 2166 } 2167 } 2168 2169 if (is_android) { 2170 # GYP: //base.gyp:base_jni_headers 2171 generate_jni("base_jni_headers") { 2172 sources = [ 2173 "android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java", 2174 "android/java/src/org/chromium/base/ApkAssets.java", 2175 "android/java/src/org/chromium/base/ApplicationStatus.java", 2176 "android/java/src/org/chromium/base/BuildInfo.java", 2177 "android/java/src/org/chromium/base/Callback.java", 2178 "android/java/src/org/chromium/base/CommandLine.java", 2179 "android/java/src/org/chromium/base/ContentUriUtils.java", 2180 "android/java/src/org/chromium/base/ContextUtils.java", 2181 "android/java/src/org/chromium/base/CpuFeatures.java", 2182 "android/java/src/org/chromium/base/EventLog.java", 2183 "android/java/src/org/chromium/base/FieldTrialList.java", 2184 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java", 2185 "android/java/src/org/chromium/base/JNIUtils.java", 2186 "android/java/src/org/chromium/base/JavaHandlerThread.java", 2187 "android/java/src/org/chromium/base/LocaleUtils.java", 2188 "android/java/src/org/chromium/base/MemoryPressureListener.java", 2189 "android/java/src/org/chromium/base/PathService.java", 2190 "android/java/src/org/chromium/base/PathUtils.java", 2191 "android/java/src/org/chromium/base/PowerMonitor.java", 2192 "android/java/src/org/chromium/base/SysUtils.java", 2193 "android/java/src/org/chromium/base/SystemMessageHandler.java", 2194 "android/java/src/org/chromium/base/ThreadUtils.java", 2195 "android/java/src/org/chromium/base/TraceEvent.java", 2196 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java", 2197 "android/java/src/org/chromium/base/metrics/RecordHistogram.java", 2198 "android/java/src/org/chromium/base/metrics/RecordUserAction.java", 2199 ] 2200 2201 public_deps = [ 2202 ":android_runtime_jni_headers", 2203 ] 2204 2205 jni_package = "base" 2206 } 2207 2208 # GYP: //base.gyp:android_runtime_jni_headers 2209 generate_jar_jni("android_runtime_jni_headers") { 2210 jni_package = "base" 2211 classes = [ "java/lang/Runtime.class" ] 2212 } 2213 2214 # GYP: //base.gyp:base_java 2215 android_library("base_java") { 2216 srcjar_deps = [ 2217 ":base_android_java_enums_srcjar", 2218 ":base_build_config_gen", 2219 ":base_native_libraries_gen", 2220 ] 2221 2222 deps = [ 2223 "//third_party/android_tools:android_support_multidex_java", 2224 "//third_party/jsr-305:jsr_305_javalib", 2225 ] 2226 2227 java_files = [ 2228 "android/java/src/org/chromium/base/ActivityState.java", 2229 "android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java", 2230 "android/java/src/org/chromium/base/ApiCompatibilityUtils.java", 2231 "android/java/src/org/chromium/base/ApkAssets.java", 2232 "android/java/src/org/chromium/base/ApplicationStatus.java", 2233 "android/java/src/org/chromium/base/BaseChromiumApplication.java", 2234 "android/java/src/org/chromium/base/BaseSwitches.java", 2235 "android/java/src/org/chromium/base/BuildInfo.java", 2236 "android/java/src/org/chromium/base/Callback.java", 2237 "android/java/src/org/chromium/base/CollectionUtil.java", 2238 "android/java/src/org/chromium/base/CommandLine.java", 2239 "android/java/src/org/chromium/base/CommandLineInitUtil.java", 2240 "android/java/src/org/chromium/base/ContentUriUtils.java", 2241 "android/java/src/org/chromium/base/ContextUtils.java", 2242 "android/java/src/org/chromium/base/CpuFeatures.java", 2243 "android/java/src/org/chromium/base/EventLog.java", 2244 "android/java/src/org/chromium/base/FieldTrialList.java", 2245 "android/java/src/org/chromium/base/FileUtils.java", 2246 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java", 2247 "android/java/src/org/chromium/base/JNIUtils.java", 2248 "android/java/src/org/chromium/base/JavaHandlerThread.java", 2249 "android/java/src/org/chromium/base/LocaleUtils.java", 2250 "android/java/src/org/chromium/base/Log.java", 2251 "android/java/src/org/chromium/base/MemoryPressureListener.java", 2252 "android/java/src/org/chromium/base/ObserverList.java", 2253 "android/java/src/org/chromium/base/PackageUtils.java", 2254 "android/java/src/org/chromium/base/PathService.java", 2255 "android/java/src/org/chromium/base/PathUtils.java", 2256 "android/java/src/org/chromium/base/PerfTraceEvent.java", 2257 "android/java/src/org/chromium/base/PowerMonitor.java", 2258 "android/java/src/org/chromium/base/PowerStatusReceiver.java", 2259 "android/java/src/org/chromium/base/Promise.java", 2260 "android/java/src/org/chromium/base/ResourceExtractor.java", 2261 "android/java/src/org/chromium/base/SecureRandomInitializer.java", 2262 "android/java/src/org/chromium/base/StreamUtil.java", 2263 "android/java/src/org/chromium/base/SysUtils.java", 2264 "android/java/src/org/chromium/base/SystemMessageHandler.java", 2265 "android/java/src/org/chromium/base/ThreadUtils.java", 2266 "android/java/src/org/chromium/base/TraceEvent.java", 2267 "android/java/src/org/chromium/base/VisibleForTesting.java", 2268 "android/java/src/org/chromium/base/annotations/AccessedByNative.java", 2269 "android/java/src/org/chromium/base/annotations/CalledByNative.java", 2270 "android/java/src/org/chromium/base/annotations/CalledByNativeUnchecked.java", 2271 "android/java/src/org/chromium/base/annotations/JNIAdditionalImport.java", 2272 "android/java/src/org/chromium/base/annotations/JNINamespace.java", 2273 "android/java/src/org/chromium/base/annotations/MainDex.java", 2274 "android/java/src/org/chromium/base/annotations/NativeCall.java", 2275 "android/java/src/org/chromium/base/annotations/NativeClassQualifiedName.java", 2276 "android/java/src/org/chromium/base/annotations/RemovableInRelease.java", 2277 "android/java/src/org/chromium/base/annotations/SuppressFBWarnings.java", 2278 "android/java/src/org/chromium/base/annotations/UsedByReflection.java", 2279 "android/java/src/org/chromium/base/library_loader/LegacyLinker.java", 2280 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java", 2281 "android/java/src/org/chromium/base/library_loader/Linker.java", 2282 "android/java/src/org/chromium/base/library_loader/LoaderErrors.java", 2283 "android/java/src/org/chromium/base/library_loader/ModernLinker.java", 2284 "android/java/src/org/chromium/base/library_loader/NativeLibraryPreloader.java", 2285 "android/java/src/org/chromium/base/library_loader/ProcessInitException.java", 2286 "android/java/src/org/chromium/base/metrics/RecordHistogram.java", 2287 "android/java/src/org/chromium/base/metrics/RecordUserAction.java", 2288 "android/java/src/org/chromium/base/multidex/ChromiumMultiDexInstaller.java", 2289 ] 2290 2291 # New versions of BuildConfig.java and NativeLibraries.java 2292 # (with the actual correct values) will be created when creating an apk. 2293 jar_excluded_patterns = [ 2294 "*/BuildConfig.class", 2295 "*/NativeLibraries.class", 2296 "*/NativeLibraries##*.class", 2297 ] 2298 } 2299 2300 # GYP: //base.gyp:base_javatests 2301 android_library("base_javatests") { 2302 deps = [ 2303 ":base_java", 2304 ":base_java_test_support", 2305 ] 2306 java_files = [ 2307 "android/javatests/src/org/chromium/base/AdvancedMockContextTest.java", 2308 "android/javatests/src/org/chromium/base/ApiCompatibilityUtilsTest.java", 2309 "android/javatests/src/org/chromium/base/CommandLineInitUtilTest.java", 2310 "android/javatests/src/org/chromium/base/CommandLineTest.java", 2311 "android/javatests/src/org/chromium/base/ObserverListTest.java", 2312 "android/javatests/src/org/chromium/base/metrics/RecordHistogramTest.java", 2313 ] 2314 } 2315 2316 # GYP: //base.gyp:base_java_test_support 2317 android_library("base_java_test_support") { 2318 deps = [ 2319 ":base_java", 2320 "//testing/android/reporter:reporter_java", 2321 ] 2322 java_files = [ 2323 "test/android/javatests/src/org/chromium/base/test/BaseActivityInstrumentationTestCase.java", 2324 "test/android/javatests/src/org/chromium/base/test/BaseChromiumInstrumentationTestRunner.java", 2325 "test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java", 2326 "test/android/javatests/src/org/chromium/base/test/BaseTestResult.java", 2327 "test/android/javatests/src/org/chromium/base/test/util/AdvancedMockContext.java", 2328 "test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java", 2329 "test/android/javatests/src/org/chromium/base/test/util/DisableIf.java", 2330 "test/android/javatests/src/org/chromium/base/test/util/DisableIfSkipCheck.java", 2331 "test/android/javatests/src/org/chromium/base/test/util/DisabledTest.java", 2332 "test/android/javatests/src/org/chromium/base/test/util/EnormousTest.java", 2333 "test/android/javatests/src/org/chromium/base/test/util/Feature.java", 2334 "test/android/javatests/src/org/chromium/base/test/util/FlakyTest.java", 2335 "test/android/javatests/src/org/chromium/base/test/util/InMemorySharedPreferences.java", 2336 "test/android/javatests/src/org/chromium/base/test/util/InstrumentationUtils.java", 2337 "test/android/javatests/src/org/chromium/base/test/util/IntegrationTest.java", 2338 "test/android/javatests/src/org/chromium/base/test/util/Manual.java", 2339 "test/android/javatests/src/org/chromium/base/test/util/MetricsUtils.java", 2340 "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevel.java", 2341 "test/android/javatests/src/org/chromium/base/test/util/MinAndroidSdkLevelSkipCheck.java", 2342 "test/android/javatests/src/org/chromium/base/test/util/PerfTest.java", 2343 "test/android/javatests/src/org/chromium/base/test/util/Restriction.java", 2344 "test/android/javatests/src/org/chromium/base/test/util/RestrictionSkipCheck.java", 2345 "test/android/javatests/src/org/chromium/base/test/util/RetryOnFailure.java", 2346 "test/android/javatests/src/org/chromium/base/test/util/ScalableTimeout.java", 2347 "test/android/javatests/src/org/chromium/base/test/util/SkipCheck.java", 2348 "test/android/javatests/src/org/chromium/base/test/util/TestFileUtil.java", 2349 "test/android/javatests/src/org/chromium/base/test/util/TestThread.java", 2350 "test/android/javatests/src/org/chromium/base/test/util/TimeoutScale.java", 2351 "test/android/javatests/src/org/chromium/base/test/util/UrlUtils.java", 2352 "test/android/javatests/src/org/chromium/base/test/util/parameter/BaseParameter.java", 2353 "test/android/javatests/src/org/chromium/base/test/util/parameter/Parameter.java", 2354 "test/android/javatests/src/org/chromium/base/test/util/parameter/Parameterizable.java", 2355 "test/android/javatests/src/org/chromium/base/test/util/parameter/ParameterizedTest.java", 2356 "test/android/javatests/src/org/chromium/base/test/util/parameter/parameters/MethodParameter.java", 2357 ] 2358 } 2359 2360 # TODO(jbudorick): Remove this once we roll to robolectric 3.0 and pull 2361 # in the multidex shadow library. crbug.com/522043 2362 # GYP: //base.gyp:base_junit_test_support 2363 java_library("base_junit_test_support") { 2364 testonly = true 2365 java_files = [ "test/android/junit/src/org/chromium/base/test/shadows/ShadowMultiDex.java" ] 2366 deps = [ 2367 "//third_party/android_tools:android_support_multidex_java", 2368 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", 2369 "//third_party/robolectric:robolectric_java", 2370 ] 2371 srcjar_deps = [ ":base_build_config_gen" ] 2372 } 2373 2374 # GYP: //base.gyp:base_junit_tests 2375 junit_binary("base_junit_tests") { 2376 java_files = [ 2377 "android/junit/src/org/chromium/base/BaseChromiumApplicationTest.java", 2378 "android/junit/src/org/chromium/base/LogTest.java", 2379 "android/junit/src/org/chromium/base/PromiseTest.java", 2380 "test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java", 2381 "test/android/junit/src/org/chromium/base/test/util/MinAndroidSdkLevelSkipCheckTest.java", 2382 "test/android/junit/src/org/chromium/base/test/util/RestrictionSkipCheckTest.java", 2383 "test/android/junit/src/org/chromium/base/test/util/SkipCheckTest.java", 2384 ] 2385 deps = [ 2386 ":base_java", 2387 ":base_java_test_support", 2388 ":base_junit_test_support", 2389 ] 2390 } 2391 2392 # GYP: //base.gyp:base_java_application_state 2393 # GYP: //base.gyp:base_java_library_load_from_apk_status_codes 2394 # GYP: //base.gyp:base_java_library_process_type 2395 # GYP: //base.gyp:base_java_memory_pressure_level 2396 java_cpp_enum("base_android_java_enums_srcjar") { 2397 sources = [ 2398 "android/application_status_listener.h", 2399 "android/library_loader/library_load_from_apk_status_codes.h", 2400 "android/library_loader/library_loader_hooks.h", 2401 "memory/memory_pressure_listener.h", 2402 ] 2403 } 2404 2405 # GYP: //base/base.gyp:base_build_config_gen 2406 java_cpp_template("base_build_config_gen") { 2407 sources = [ 2408 "android/java/templates/BuildConfig.template", 2409 ] 2410 package_name = "org/chromium/base" 2411 2412 defines = [] 2413 if (!is_java_debug) { 2414 defines += [ "NDEBUG" ] 2415 } 2416 } 2417 2418 # GYP: //base/base.gyp:base_native_libraries_gen 2419 java_cpp_template("base_native_libraries_gen") { 2420 sources = [ 2421 "android/java/templates/NativeLibraries.template", 2422 ] 2423 package_name = "org/chromium/base/library_loader" 2424 } 2425 2426 # GYP: //base.gyp:base_java_unittest_support 2427 android_library("base_java_unittest_support") { 2428 deps = [ 2429 ":base_java", 2430 ] 2431 java_files = 2432 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] 2433 } 2434 } 2435