Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: base/BUILD.gn

Issue 237973002: Add generate_jni template (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « BUILD.gn ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "third_party/superfasthash/superfasthash.c", 15 "third_party/superfasthash/superfasthash.c",
15 "allocator/allocator_extension.cc", 16 "allocator/allocator_extension.cc",
16 "allocator/allocator_extension.h", 17 "allocator/allocator_extension.h",
17 "allocator/type_profiler_control.cc", 18 "allocator/type_profiler_control.cc",
18 "allocator/type_profiler_control.h", 19 "allocator/type_profiler_control.h",
19 "android/activity_status.cc", 20 "android/application_status_listener.cc",
20 "android/activity_status.h", 21 "android/application_status_listener.h",
21 "android/base_jni_registrar.cc", 22 "android/base_jni_registrar.cc",
22 "android/base_jni_registrar.h", 23 "android/base_jni_registrar.h",
23 "android/build_info.cc", 24 "android/build_info.cc",
24 "android/build_info.h", 25 "android/build_info.h",
26 "android/command_line_android.cc",
27 "android/command_line_android.h",
28 "android/content_uri_utils.cc",
29 "android/content_uri_utils.h",
25 "android/cpu_features.cc", 30 "android/cpu_features.cc",
26 "android/fifo_utils.cc", 31 "android/fifo_utils.cc",
27 "android/fifo_utils.h", 32 "android/fifo_utils.h",
28 "android/important_file_writer_android.cc", 33 "android/important_file_writer_android.cc",
29 "android/important_file_writer_android.h", 34 "android/important_file_writer_android.h",
30 "android/scoped_java_ref.cc", 35 "android/scoped_java_ref.cc",
31 "android/scoped_java_ref.h", 36 "android/scoped_java_ref.h",
32 "android/jni_android.cc", 37 "android/jni_android.cc",
33 "android/jni_android.h", 38 "android/jni_android.h",
34 "android/jni_array.cc", 39 "android/jni_array.cc",
35 "android/jni_array.h", 40 "android/jni_array.h",
36 "android/jni_helper.cc", 41 "android/jni_helper.cc",
37 "android/jni_helper.h", 42 "android/jni_helper.h",
38 "android/jni_registrar.cc", 43 "android/jni_registrar.cc",
39 "android/jni_registrar.h", 44 "android/jni_registrar.h",
40 "android/jni_string.cc", 45 "android/jni_string.cc",
41 "android/jni_string.h", 46 "android/jni_string.h",
47 "android/library_loader/library_loader_hooks.cc",
48 "android/library_loader/library_loader_hooks.h",
42 "android/memory_pressure_listener_android.cc", 49 "android/memory_pressure_listener_android.cc",
43 "android/memory_pressure_listener_android.h", 50 "android/memory_pressure_listener_android.h",
51 "android/java_handler_thread.cc",
52 "android/java_handler_thread.h",
44 "android/path_service_android.cc", 53 "android/path_service_android.cc",
45 "android/path_service_android.h", 54 "android/path_service_android.h",
46 "android/path_utils.cc", 55 "android/path_utils.cc",
47 "android/path_utils.h", 56 "android/path_utils.h",
48 "android/sys_utils.cc", 57 "android/sys_utils.cc",
49 "android/sys_utils.h", 58 "android/sys_utils.h",
50 "android/thread_utils.h", 59 "android/thread_utils.h",
51 "android/trace_event_binding.cc", 60 "android/trace_event_binding.cc",
52 "android/trace_event_binding.h", 61 "android/trace_event_binding.h",
53 "at_exit.cc", 62 "at_exit.cc",
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 "win/startup_information.cc", 684 "win/startup_information.cc",
676 "win/startup_information.h", 685 "win/startup_information.h",
677 "win/win_util.cc", 686 "win/win_util.cc",
678 "win/win_util.h", 687 "win/win_util.h",
679 "win/windows_version.cc", 688 "win/windows_version.cc",
680 "win/windows_version.h", 689 "win/windows_version.h",
681 "win/wrapped_window_proc.cc", 690 "win/wrapped_window_proc.cc",
682 "win/wrapped_window_proc.h", 691 "win/wrapped_window_proc.h",
683 ] 692 ]
684 693
685 if (is_android) {
686 sources -= [
687 "debug/stack_trace_posix.cc",
688 ]
689
690 # TODO(dpranke): crbug.com/360936.
691 # These are disabled until we have JNI support on Android.
692 sources -= [
693 "android/activity_status.cc",
694 "android/base_jni_registrar.cc",
695 "android/base_jni_registrar.h",
696 "android/build_info.cc",
697 "android/build_info.h",
698 "android/cpu_features.cc",
699 "android/important_file_writer_android.cc",
700 "android/memory_pressure_listener_android.cc",
701 "android/path_service_android.cc",
702 "android/path_utils.cc",
703 "android/sys_utils.cc",
704 "android/trace_event_binding.cc",
705 "message_loop/message_pump_android.cc",
706 "power_monitor/power_monitor_device_source_android.cc",
707 "threading/platform_thread_android.cc",
708 ]
709 }
710
711 # TODO(brettw) I don't understand the conditions this file is used. 694 # TODO(brettw) I don't understand the conditions this file is used.
712 sources -= [ "files/file_path_watcher_stub.cc" ] 695 sources -= [ "files/file_path_watcher_stub.cc" ]
713 696
714 sources -= [ 697 sources -= [
715 "process/process_handle_freebsd.cc", 698 "process/process_handle_freebsd.cc",
716 "process/process_handle_openbsd.cc", 699 "process/process_handle_openbsd.cc",
717 "process/process_iterator_freebsd.cc", 700 "process/process_iterator_freebsd.cc",
718 "process/process_iterator_openbsd.cc", 701 "process/process_iterator_openbsd.cc",
719 "process/process_metrics_freebsd.cc", 702 "process/process_metrics_freebsd.cc",
720 "process/process_metrics_openbsd.cc", 703 "process/process_metrics_openbsd.cc",
721 "sys_info_freebsd.cc", 704 "sys_info_freebsd.cc",
722 "sys_info_openbsd.cc", 705 "sys_info_openbsd.cc",
723 ] 706 ]
724 707
725 defines = [ 708 defines = [
726 "BASE_IMPLEMENTATION", 709 "BASE_IMPLEMENTATION",
727 ] 710 ]
728 711
729 deps = [ 712 deps = [
730 ":base_static", 713 ":base_static",
731 "//base/allocator:allocator_extension_thunks", 714 "//base/allocator:allocator_extension_thunks",
732 "//base/third_party/dynamic_annotations", 715 "//base/third_party/dynamic_annotations",
733 "//base/third_party/nspr", 716 "//base/third_party/nspr",
734 "//third_party/modp_b64", 717 "//third_party/modp_b64",
735 ] 718 ]
736 719
720 if (is_android) {
721 deps += [
722 ":base_jni_headers",
723 "//third_party/android_tools:cpu_features"
724 ]
725
726 sources -= [
727 "debug/stack_trace_posix.cc",
728 ]
729 }
730
737 if (is_nacl) { 731 if (is_nacl) {
738 # These things would otherwise be built on a Posix build but aren't 732 # These things would otherwise be built on a Posix build but aren't
739 # supported on NaCl. 733 # supported on NaCl.
740 sources -= [ 734 sources -= [
741 "debug/stack_trace_posix.cc", 735 "debug/stack_trace_posix.cc",
742 "files/file_enumerator_posix.cc", 736 "files/file_enumerator_posix.cc",
743 "file_util_posix.cc", 737 "file_util_posix.cc",
744 "message_loop/message_pump_libevent.cc", 738 "message_loop/message_pump_libevent.cc",
745 "process/kill_posix.cc", 739 "process/kill_posix.cc",
746 "process/launch_posix.cc", 740 "process/launch_posix.cc",
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 # # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 905 # # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
912 # 'msvs_disabled_warnings': [ 906 # 'msvs_disabled_warnings': [
913 # 4267, 907 # 4267,
914 # ], 908 # ],
915 # }], 909 # }],
916 #], 910 #],
917 #'variables': { 911 #'variables': {
918 # 'optimize': 'max', 912 # 'optimize': 'max',
919 #}, 913 #},
920 } 914 }
915
916 if (is_android) {
917 generate_jni("base_jni_headers") {
918 sources = [
919 "android/java/src/org/chromium/base/ApplicationStatus.java",
920 "android/java/src/org/chromium/base/BuildInfo.java",
921 "android/java/src/org/chromium/base/CommandLine.java",
922 "android/java/src/org/chromium/base/ContentUriUtils.java",
923 "android/java/src/org/chromium/base/CpuFeatures.java",
924 "android/java/src/org/chromium/base/ImportantFileWriterAndroid.java",
925 "android/java/src/org/chromium/base/library_loader/LibraryLoader.java",
926 "android/java/src/org/chromium/base/MemoryPressureListener.java",
927 "android/java/src/org/chromium/base/JavaHandlerThread.java",
928 "android/java/src/org/chromium/base/PathService.java",
929 "android/java/src/org/chromium/base/PathUtils.java",
930 "android/java/src/org/chromium/base/PowerMonitor.java",
931 "android/java/src/org/chromium/base/SystemMessageHandler.java",
932 "android/java/src/org/chromium/base/SysUtils.java",
933 "android/java/src/org/chromium/base/ThreadUtils.java",
934 "android/java/src/org/chromium/base/TraceEvent.java",
935 ]
936 jni_package = "base"
937 }
938 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698