OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 6 import("//build/config/android/rules.gni") |
6 | 7 |
7 component("base") { | 8 component("base") { |
8 sources = [ | 9 sources = [ |
9 "third_party/dmg_fp/dmg_fp.h", | 10 "third_party/dmg_fp/dmg_fp.h", |
10 "third_party/dmg_fp/g_fmt.cc", | 11 "third_party/dmg_fp/g_fmt.cc", |
11 "third_party/dmg_fp/dtoa_wrapper.cc", | 12 "third_party/dmg_fp/dtoa_wrapper.cc", |
12 "third_party/icu/icu_utf.cc", | 13 "third_party/icu/icu_utf.cc", |
13 "third_party/icu/icu_utf.h", | 14 "third_party/icu/icu_utf.h", |
14 "allocator/allocator_extension.cc", | 15 "allocator/allocator_extension.cc", |
15 "allocator/allocator_extension.h", | 16 "allocator/allocator_extension.h", |
16 "allocator/type_profiler_control.cc", | 17 "allocator/type_profiler_control.cc", |
17 "allocator/type_profiler_control.h", | 18 "allocator/type_profiler_control.h", |
18 "android/activity_status.cc", | 19 "android/application_status_listener.cc", |
19 "android/activity_status.h", | 20 "android/application_status_listener.h", |
20 "android/base_jni_registrar.cc", | 21 "android/base_jni_registrar.cc", |
21 "android/base_jni_registrar.h", | 22 "android/base_jni_registrar.h", |
22 "android/build_info.cc", | 23 "android/build_info.cc", |
23 "android/build_info.h", | 24 "android/build_info.h", |
| 25 "android/command_line_android.cc", |
| 26 "android/command_line_android.h", |
| 27 "android/content_uri_utils.cc", |
| 28 "android/content_uri_utils.h", |
24 "android/cpu_features.cc", | 29 "android/cpu_features.cc", |
25 "android/fifo_utils.cc", | 30 "android/fifo_utils.cc", |
26 "android/fifo_utils.h", | 31 "android/fifo_utils.h", |
27 "android/important_file_writer_android.cc", | 32 "android/important_file_writer_android.cc", |
28 "android/important_file_writer_android.h", | 33 "android/important_file_writer_android.h", |
29 "android/scoped_java_ref.cc", | 34 "android/scoped_java_ref.cc", |
30 "android/scoped_java_ref.h", | 35 "android/scoped_java_ref.h", |
31 "android/jni_android.cc", | 36 "android/jni_android.cc", |
32 "android/jni_android.h", | 37 "android/jni_android.h", |
33 "android/jni_array.cc", | 38 "android/jni_array.cc", |
34 "android/jni_array.h", | 39 "android/jni_array.h", |
35 "android/jni_helper.cc", | 40 "android/jni_helper.cc", |
36 "android/jni_helper.h", | 41 "android/jni_helper.h", |
37 "android/jni_registrar.cc", | 42 "android/jni_registrar.cc", |
38 "android/jni_registrar.h", | 43 "android/jni_registrar.h", |
39 "android/jni_string.cc", | 44 "android/jni_string.cc", |
40 "android/jni_string.h", | 45 "android/jni_string.h", |
| 46 "android/library_loader/library_loader_hooks.cc", |
| 47 "android/library_loader/library_loader_hooks.h", |
41 "android/memory_pressure_listener_android.cc", | 48 "android/memory_pressure_listener_android.cc", |
42 "android/memory_pressure_listener_android.h", | 49 "android/memory_pressure_listener_android.h", |
| 50 "android/java_handler_thread.cc", |
| 51 "android/java_handler_thread.h", |
43 "android/path_service_android.cc", | 52 "android/path_service_android.cc", |
44 "android/path_service_android.h", | 53 "android/path_service_android.h", |
45 "android/path_utils.cc", | 54 "android/path_utils.cc", |
46 "android/path_utils.h", | 55 "android/path_utils.h", |
47 "android/sys_utils.cc", | 56 "android/sys_utils.cc", |
48 "android/sys_utils.h", | 57 "android/sys_utils.h", |
49 "android/thread_utils.h", | 58 "android/thread_utils.h", |
50 "android/trace_event_binding.cc", | 59 "android/trace_event_binding.cc", |
51 "android/trace_event_binding.h", | 60 "android/trace_event_binding.h", |
52 "at_exit.cc", | 61 "at_exit.cc", |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 "win/startup_information.cc", | 683 "win/startup_information.cc", |
675 "win/startup_information.h", | 684 "win/startup_information.h", |
676 "win/win_util.cc", | 685 "win/win_util.cc", |
677 "win/win_util.h", | 686 "win/win_util.h", |
678 "win/windows_version.cc", | 687 "win/windows_version.cc", |
679 "win/windows_version.h", | 688 "win/windows_version.h", |
680 "win/wrapped_window_proc.cc", | 689 "win/wrapped_window_proc.cc", |
681 "win/wrapped_window_proc.h", | 690 "win/wrapped_window_proc.h", |
682 ] | 691 ] |
683 | 692 |
684 if (is_android) { | |
685 sources -= [ | |
686 "debug/stack_trace_posix.cc", | |
687 ] | |
688 | |
689 # TODO(dpranke): crbug.com/360936. | |
690 # These are disabled until we have JNI support on Android. | |
691 sources -= [ | |
692 "android/activity_status.cc", | |
693 "android/base_jni_registrar.cc", | |
694 "android/base_jni_registrar.h", | |
695 "android/build_info.cc", | |
696 "android/build_info.h", | |
697 "android/cpu_features.cc", | |
698 "android/important_file_writer_android.cc", | |
699 "android/memory_pressure_listener_android.cc", | |
700 "android/path_service_android.cc", | |
701 "android/path_utils.cc", | |
702 "android/sys_utils.cc", | |
703 "android/trace_event_binding.cc", | |
704 "message_loop/message_pump_android.cc", | |
705 "power_monitor/power_monitor_device_source_android.cc", | |
706 "threading/platform_thread_android.cc", | |
707 ] | |
708 } | |
709 | |
710 # TODO(brettw) I don't understand the conditions this file is used. | 693 # TODO(brettw) I don't understand the conditions this file is used. |
711 sources -= [ "files/file_path_watcher_stub.cc" ] | 694 sources -= [ "files/file_path_watcher_stub.cc" ] |
712 | 695 |
713 sources -= [ | 696 sources -= [ |
714 "process/process_handle_freebsd.cc", | 697 "process/process_handle_freebsd.cc", |
715 "process/process_handle_openbsd.cc", | 698 "process/process_handle_openbsd.cc", |
716 "process/process_iterator_freebsd.cc", | 699 "process/process_iterator_freebsd.cc", |
717 "process/process_iterator_openbsd.cc", | 700 "process/process_iterator_openbsd.cc", |
718 "process/process_metrics_freebsd.cc", | 701 "process/process_metrics_freebsd.cc", |
719 "process/process_metrics_openbsd.cc", | 702 "process/process_metrics_openbsd.cc", |
720 "sys_info_freebsd.cc", | 703 "sys_info_freebsd.cc", |
721 "sys_info_openbsd.cc", | 704 "sys_info_openbsd.cc", |
722 ] | 705 ] |
723 | 706 |
724 defines = [ | 707 defines = [ |
725 "BASE_IMPLEMENTATION", | 708 "BASE_IMPLEMENTATION", |
726 ] | 709 ] |
727 | 710 |
728 deps = [ | 711 deps = [ |
729 ":base_static", | 712 ":base_static", |
730 "//base/allocator:allocator_extension_thunks", | 713 "//base/allocator:allocator_extension_thunks", |
731 "//base/third_party/dynamic_annotations", | 714 "//base/third_party/dynamic_annotations", |
732 "//base/third_party/nspr", | 715 "//base/third_party/nspr", |
733 "//third_party/modp_b64", | 716 "//third_party/modp_b64", |
734 ] | 717 ] |
735 | 718 |
| 719 if (is_android) { |
| 720 deps += [ |
| 721 ":base_jni_headers", |
| 722 "//third_party/android_tools:cpu_features" |
| 723 ] |
| 724 |
| 725 sources -= [ |
| 726 "debug/stack_trace_posix.cc", |
| 727 ] |
| 728 } |
| 729 |
736 if (!is_chromeos) { | 730 if (!is_chromeos) { |
737 sources -= [ | 731 sources -= [ |
738 "sys_info_chromeos.cc", | 732 "sys_info_chromeos.cc", |
739 ] | 733 ] |
740 } | 734 } |
741 | 735 |
742 if (is_nacl) { | 736 if (is_nacl) { |
743 # These things would otherwise be built on a Posix build but aren't | 737 # These things would otherwise be built on a Posix build but aren't |
744 # supported on NaCl. | 738 # supported on NaCl. |
745 sources -= [ | 739 sources -= [ |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 # # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 914 # # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
921 # 'msvs_disabled_warnings': [ | 915 # 'msvs_disabled_warnings': [ |
922 # 4267, | 916 # 4267, |
923 # ], | 917 # ], |
924 # }], | 918 # }], |
925 #], | 919 #], |
926 #'variables': { | 920 #'variables': { |
927 # 'optimize': 'max', | 921 # 'optimize': 'max', |
928 #}, | 922 #}, |
929 } | 923 } |
| 924 |
| 925 if (is_android) { |
| 926 generate_jni("base_jni_headers") { |
| 927 sources = [ |
| 928 "android/java/src/org/chromium/base/ApplicationStatus.java", |
| 929 "android/java/src/org/chromium/base/BuildInfo.java", |
| 930 "android/java/src/org/chromium/base/CommandLine.java", |
| 931 "android/java/src/org/chromium/base/ContentUriUtils.java", |
| 932 "android/java/src/org/chromium/base/CpuFeatures.java", |
| 933 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java", |
| 934 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java", |
| 935 "android/java/src/org/chromium/base/MemoryPressureListener.java", |
| 936 "android/java/src/org/chromium/base/JavaHandlerThread.java", |
| 937 "android/java/src/org/chromium/base/PathService.java", |
| 938 "android/java/src/org/chromium/base/PathUtils.java", |
| 939 "android/java/src/org/chromium/base/PowerMonitor.java", |
| 940 "android/java/src/org/chromium/base/SystemMessageHandler.java", |
| 941 "android/java/src/org/chromium/base/SysUtils.java", |
| 942 "android/java/src/org/chromium/base/ThreadUtils.java", |
| 943 "android/java/src/org/chromium/base/TraceEvent.java", |
| 944 ] |
| 945 jni_package = "base" |
| 946 } |
| 947 } |
OLD | NEW |