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

Side by Side Diff: base/BUILD.gn

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « DEPS ('k') | base/allocator/BUILD.gn » ('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 6
7 if (is_android) { 7 if (is_android) {
8 import("//build/config/android/rules.gni") 8 import("//build/config/android/rules.gni")
9 } 9 }
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 "debug/crash_logging.cc", 139 "debug/crash_logging.cc",
140 "debug/crash_logging.h", 140 "debug/crash_logging.h",
141 "debug/debugger.cc", 141 "debug/debugger.cc",
142 "debug/debugger.h", 142 "debug/debugger.h",
143 "debug/debugger_posix.cc", 143 "debug/debugger_posix.cc",
144 "debug/debugger_win.cc", 144 "debug/debugger_win.cc",
145 "debug/dump_without_crashing.cc", 145 "debug/dump_without_crashing.cc",
146 "debug/dump_without_crashing.h", 146 "debug/dump_without_crashing.h",
147 "debug/gdi_debug_util_win.cc", 147 "debug/gdi_debug_util_win.cc",
148 "debug/gdi_debug_util_win.h", 148 "debug/gdi_debug_util_win.h",
149
149 # This file depends on files from the "allocator" target, 150 # This file depends on files from the "allocator" target,
150 # but this target does not depend on "allocator" (see 151 # but this target does not depend on "allocator" (see
151 # allocator.gyp for details). 152 # allocator.gyp for details).
152 "debug/leak_annotations.h", 153 "debug/leak_annotations.h",
153 "debug/leak_tracker.h", 154 "debug/leak_tracker.h",
154 "debug/proc_maps_linux.cc", 155 "debug/proc_maps_linux.cc",
155 "debug/proc_maps_linux.h", 156 "debug/proc_maps_linux.h",
156 "debug/profiler.cc", 157 "debug/profiler.cc",
157 "debug/profiler.h", 158 "debug/profiler.h",
158 "debug/stack_trace.cc", 159 "debug/stack_trace.cc",
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 "process/process_handle_freebsd.cc", 754 "process/process_handle_freebsd.cc",
754 "process/process_handle_openbsd.cc", 755 "process/process_handle_openbsd.cc",
755 "process/process_iterator_freebsd.cc", 756 "process/process_iterator_freebsd.cc",
756 "process/process_iterator_openbsd.cc", 757 "process/process_iterator_openbsd.cc",
757 "process/process_metrics_freebsd.cc", 758 "process/process_metrics_freebsd.cc",
758 "process/process_metrics_openbsd.cc", 759 "process/process_metrics_openbsd.cc",
759 "sys_info_freebsd.cc", 760 "sys_info_freebsd.cc",
760 "sys_info_openbsd.cc", 761 "sys_info_openbsd.cc",
761 ] 762 ]
762 763
763 defines = [ 764 defines = [ "BASE_IMPLEMENTATION" ]
764 "BASE_IMPLEMENTATION",
765 ]
766 765
767 deps = [ 766 deps = [
768 ":base_static", 767 ":base_static",
769 "//base/allocator:allocator_extension_thunks", 768 "//base/allocator:allocator_extension_thunks",
770 "//base/third_party/dynamic_annotations", 769 "//base/third_party/dynamic_annotations",
771 "//base/third_party/nspr", 770 "//base/third_party/nspr",
772 "//third_party/modp_b64", 771 "//third_party/modp_b64",
773 ] 772 ]
774 773
775 if (is_android) { 774 if (is_android) {
776 sources += [ 775 sources += [
777 "memory/discardable_memory_ashmem_allocator.cc", 776 "memory/discardable_memory_ashmem_allocator.cc",
778 "memory/discardable_memory_ashmem_allocator.h", 777 "memory/discardable_memory_ashmem_allocator.h",
779 "memory/discardable_memory_ashmem.cc", 778 "memory/discardable_memory_ashmem.cc",
780 "memory/discardable_memory_ashmem.h", 779 "memory/discardable_memory_ashmem.h",
781 ] 780 ]
782 sources -= [ 781 sources -= [
783 "base_paths_posix.cc", 782 "base_paths_posix.cc",
784 "power_monitor/power_monitor_device_source_posix.cc", 783 "power_monitor/power_monitor_device_source_posix.cc",
785 ] 784 ]
786 785
787 # Android uses some Linux sources, put those back. 786 # Android uses some Linux sources, put those back.
788 set_sources_assignment_filter([]) 787 set_sources_assignment_filter([])
789 sources += [ 788 sources += [
790 "debug/proc_maps_linux.cc", 789 "debug/proc_maps_linux.cc",
791 "files/file_path_watcher_linux.cc", 790 "files/file_path_watcher_linux.cc",
792 "process/memory_linux.cc", 791 "process/memory_linux.cc",
793 "process/internal_linux.cc", 792 "process/internal_linux.cc",
794 "process/process_handle_linux.cc", 793 "process/process_handle_linux.cc",
795 "process/process_iterator_linux.cc", 794 "process/process_iterator_linux.cc",
796 "process/process_metrics_linux.cc", 795 "process/process_metrics_linux.cc",
797 "posix/unix_domain_socket_linux.cc", 796 "posix/unix_domain_socket_linux.cc",
798 "sys_info_linux.cc", 797 "sys_info_linux.cc",
799 ] 798 ]
800 set_sources_assignment_filter(sources_assignment_filter) 799 set_sources_assignment_filter(sources_assignment_filter)
801 800
802 deps += [ 801 deps += [
803 ":base_jni_headers", 802 ":base_jni_headers",
804 "//third_party/ashmem", 803 "//third_party/ashmem",
805 "//third_party/android_tools:cpu_features" 804 "//third_party/android_tools:cpu_features",
806 ] 805 ]
807 806
808 # logging.cc uses the Android logging library. 807 # logging.cc uses the Android logging library.
809 libs = [ "log" ] 808 libs = [ "log" ]
810 809
811 sources -= [ 810 sources -= [ "debug/stack_trace_posix.cc" ]
812 "debug/stack_trace_posix.cc",
813 ]
814 } 811 }
815 812
816 if (is_chromeos) { 813 if (is_chromeos) {
817 sources -= [ 814 sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ]
818 "power_monitor/power_monitor_device_source_posix.cc",
819 ]
820 } 815 }
821 816
822 if (is_nacl) { 817 if (is_nacl) {
823 # These things would otherwise be built on a Posix build but aren't 818 # These things would otherwise be built on a Posix build but aren't
824 # supported on NaCl. 819 # supported on NaCl.
825 sources -= [ 820 sources -= [
826 "debug/stack_trace_posix.cc", 821 "debug/stack_trace_posix.cc",
827 "files/file_enumerator_posix.cc", 822 "files/file_enumerator_posix.cc",
828 "files/file_util_posix.cc", 823 "files/file_util_posix.cc",
829 "message_loop/message_pump_libevent.cc", 824 "message_loop/message_pump_libevent.cc",
(...skipping 16 matching lines...) Expand all
846 "memory/shared_memory_nacl.cc", 841 "memory/shared_memory_nacl.cc",
847 ] 842 ]
848 } 843 }
849 844
850 # Windows. 845 # Windows.
851 if (is_win) { 846 if (is_win) {
852 sources -= [ 847 sources -= [
853 "event_recorder_stubs.cc", 848 "event_recorder_stubs.cc",
854 "message_loop/message_pump_libevent.cc", 849 "message_loop/message_pump_libevent.cc",
855 "strings/string16.cc", 850 "strings/string16.cc",
851
856 # Not using sha1_win.cc because it may have caused a 852 # Not using sha1_win.cc because it may have caused a
857 # regression to page cycler moz. 853 # regression to page cycler moz.
858 "sha1_win.cc", 854 "sha1_win.cc",
859 ] 855 ]
860 856
861 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 857 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
862 cflags = [ "/wd4267" ] 858 cflags = [ "/wd4267" ]
863 859
864 libs = [ 860 libs = [
865 "cfgmgr32.lib", 861 "cfgmgr32.lib",
866 "netapi32.lib", 862 "netapi32.lib",
867 "powrprof.lib", 863 "powrprof.lib",
868 "setupapi.lib", 864 "setupapi.lib",
869 ] 865 ]
870 ldflags = [ 866 ldflags = [
871 "/DELAYLOAD:cfgmgr32.dll", 867 "/DELAYLOAD:cfgmgr32.dll",
872 "/DELAYLOAD:powrprof.dll", 868 "/DELAYLOAD:powrprof.dll",
873 "/DELAYLOAD:setupapi.dll", 869 "/DELAYLOAD:setupapi.dll",
874 ] 870 ]
875 } else if (!is_nacl) { 871 } else if (!is_nacl) {
876 # Non-Windows. 872 # Non-Windows.
877 deps += [ "//third_party/libevent" ] 873 deps += [ "//third_party/libevent" ]
878 } 874 }
879 875
880 # Mac. 876 # Mac.
881 if (is_mac) { 877 if (is_mac) {
882 sources += [ 878 sources += [
883 "memory/discardable_memory_mach.cc", 879 "memory/discardable_memory_mach.cc",
884 "memory/discardable_memory_mach.h", 880 "memory/discardable_memory_mach.h",
885 ] 881 ]
886 sources -= [ 882 sources -= [
887 "base_paths_posix.cc", 883 "base_paths_posix.cc",
888 "native_library_posix.cc", 884 "native_library_posix.cc",
889 "strings/sys_string_conversions_posix.cc", 885 "strings/sys_string_conversions_posix.cc",
890 ] 886 ]
891 deps += [ "//third_party/mach_override" ] 887 deps += [ "//third_party/mach_override" ]
892 } else { 888 } else {
893 # Non-Mac. 889 # Non-Mac.
894 sources -= [ 890 sources -= [
895 "files/file_path_watcher_fsevents.cc", 891 "files/file_path_watcher_fsevents.cc",
896 "files/file_path_watcher_fsevents.h", 892 "files/file_path_watcher_fsevents.h",
897 "files/file_path_watcher_kqueue.cc", 893 "files/file_path_watcher_kqueue.cc",
898 "files/file_path_watcher_kqueue.h", 894 "files/file_path_watcher_kqueue.h",
899 ] 895 ]
900 } 896 }
901 897
902 # Linux. 898 # Linux.
903 if (is_linux) { 899 if (is_linux) {
904 # TODO(brettw) this will need to be parameterized at some point. 900 # TODO(brettw) this will need to be parameterized at some point.
905 linux_configs = [ 901 linux_configs = [ "//build/config/linux:glib" ]
906 "//build/config/linux:glib",
907 ]
908 902
909 configs += linux_configs 903 configs += linux_configs
910 all_dependent_configs = linux_configs 904 all_dependent_configs = linux_configs
911 905
912 defines += [ "USE_SYMBOLIZE" ] 906 defines += [ "USE_SYMBOLIZE" ]
913 907
914 # These dependencies are not required on Android, and in the case 908 # These dependencies are not required on Android, and in the case
915 # of xdg_mime must be excluded due to licensing restrictions. 909 # of xdg_mime must be excluded due to licensing restrictions.
916 deps += [ 910 deps += [
917 "//base/third_party/symbolize", 911 "//base/third_party/symbolize",
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 "prefs/pref_value_store.h", 1053 "prefs/pref_value_store.h",
1060 "prefs/scoped_user_pref_update.cc", 1054 "prefs/scoped_user_pref_update.cc",
1061 "prefs/scoped_user_pref_update.h", 1055 "prefs/scoped_user_pref_update.h",
1062 "prefs/value_map_pref_store.cc", 1056 "prefs/value_map_pref_store.cc",
1063 "prefs/value_map_pref_store.h", 1057 "prefs/value_map_pref_store.h",
1064 "prefs/writeable_pref_store.h", 1058 "prefs/writeable_pref_store.h",
1065 ] 1059 ]
1066 1060
1067 defines = [ "BASE_PREFS_IMPLEMENTATION" ] 1061 defines = [ "BASE_PREFS_IMPLEMENTATION" ]
1068 1062
1069 deps = [ ":base" ] 1063 deps = [
1064 ":base",
1065 ]
1070 1066
1071 if (is_android && !is_debug) { 1067 if (is_android && !is_debug) {
1072 configs -= [ "//build/config/compiler:optimize" ] 1068 configs -= [ "//build/config/compiler:optimize" ]
1073 configs += [ "//build/config/compiler:optimize_max" ] 1069 configs += [ "//build/config/compiler:optimize_max" ]
1074 } 1070 }
1075 } 1071 }
1076 1072
1077 source_set("prefs_test_support") { 1073 source_set("prefs_test_support") {
1078 testonly = true 1074 testonly = true
1079 sources = [ 1075 sources = [
1080 "prefs/mock_pref_change_callback.cc", 1076 "prefs/mock_pref_change_callback.cc",
1081 "prefs/mock_pref_change_callback.h", 1077 "prefs/mock_pref_change_callback.h",
1082 "prefs/pref_store_observer_mock.cc", 1078 "prefs/pref_store_observer_mock.cc",
1083 "prefs/pref_store_observer_mock.h", 1079 "prefs/pref_store_observer_mock.h",
1084 "prefs/testing_pref_service.cc", 1080 "prefs/testing_pref_service.cc",
1085 "prefs/testing_pref_service.h", 1081 "prefs/testing_pref_service.h",
1086 "prefs/testing_pref_store.cc", 1082 "prefs/testing_pref_store.cc",
1087 "prefs/testing_pref_store.h", 1083 "prefs/testing_pref_store.h",
1088 ] 1084 ]
1089 1085
1086 public_deps = [
1087 ":prefs",
1088 ]
1090 deps = [ 1089 deps = [
1091 ":base", 1090 ":base",
1092 ":prefs",
1093 "//testing/gmock", 1091 "//testing/gmock",
1094 "//testing/gtest", 1092 "//testing/gtest",
1095 ] 1093 ]
1096 } 1094 }
1097 1095
1098 source_set("message_loop_tests") { 1096 source_set("message_loop_tests") {
1099 testonly = true 1097 testonly = true
1100 sources = [ 1098 sources = [
1101 "message_loop/message_loop_test.cc", 1099 "message_loop/message_loop_test.cc",
1102 "message_loop/message_loop_test.h", 1100 "message_loop/message_loop_test.h",
1103 ] 1101 ]
1104 1102
1105 deps = [ 1103 deps = [
1106 ":base", 1104 ":base",
1107 "//testing/gtest", 1105 "//testing/gtest",
1108 ] 1106 ]
1109 } 1107 }
1110 1108
1111 # TODO(pasko): Remove this target when crbug.com/424562 is fixed. 1109 # TODO(pasko): Remove this target when crbug.com/424562 is fixed.
1112 source_set("protect_file_posix") { 1110 source_set("protect_file_posix") {
1113 sources = [ 1111 sources = [
1114 "files/protect_file_posix.cc", 1112 "files/protect_file_posix.cc",
1115 ] 1113 ]
1116 } 1114 }
1117 1115
1118 test("base_unittests") { 1116 test("base_unittests") {
1119 sources = [ 1117 sources = [
1120 "android/application_status_listener_unittest.cc", 1118 "android/application_status_listener_unittest.cc",
1119 "android/content_uri_utils_unittest.cc",
1121 "android/jni_android_unittest.cc", 1120 "android/jni_android_unittest.cc",
1122 "android/jni_array_unittest.cc", 1121 "android/jni_array_unittest.cc",
1123 "android/jni_string_unittest.cc", 1122 "android/jni_string_unittest.cc",
1124 "android/path_utils_unittest.cc", 1123 "android/path_utils_unittest.cc",
1125 "android/scoped_java_ref_unittest.cc", 1124 "android/scoped_java_ref_unittest.cc",
1126 "android/sys_utils_unittest.cc", 1125 "android/sys_utils_unittest.cc",
1127 "async_socket_io_handler_unittest.cc", 1126 "async_socket_io_handler_unittest.cc",
1128 "at_exit_unittest.cc", 1127 "at_exit_unittest.cc",
1129 "atomicops_unittest.cc", 1128 "atomicops_unittest.cc",
1130 "barrier_closure_unittest.cc", 1129 "barrier_closure_unittest.cc",
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1396 if (!is_linux || use_ozone) { 1395 if (!is_linux || use_ozone) {
1397 sources -= [ "message_loop/message_pump_glib_unittest.cc" ] 1396 sources -= [ "message_loop/message_pump_glib_unittest.cc" ]
1398 } 1397 }
1399 1398
1400 if (is_posix || is_ios) { 1399 if (is_posix || is_ios) {
1401 sources += [ "message_loop/message_pump_libevent_unittest.cc" ] 1400 sources += [ "message_loop/message_pump_libevent_unittest.cc" ]
1402 deps += [ "//third_party/libevent" ] 1401 deps += [ "//third_party/libevent" ]
1403 } 1402 }
1404 1403
1405 if (is_android) { 1404 if (is_android) {
1406 deps += [ 1405 deps += [ "//testing/android:native_test_native_code" ]
1407 "//testing/android:native_test_native_code",
1408 ]
1409 set_sources_assignment_filter([]) 1406 set_sources_assignment_filter([])
1410 sources += [ "debug/proc_maps_linux_unittest.cc" ] 1407 sources += [ "debug/proc_maps_linux_unittest.cc" ]
1411 set_sources_assignment_filter(sources_assignment_filter) 1408 set_sources_assignment_filter(sources_assignment_filter)
1412 } 1409 }
1413 1410
1414 if (is_win) { 1411 if (is_win) {
1415 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1412 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1416 cflags = [ "/wd4267" ] 1413 cflags = [ "/wd4267" ]
1417 } 1414 }
1418 } 1415 }
(...skipping 27 matching lines...) Expand all
1446 } 1443 }
1447 1444
1448 # GYP: //base.gyp:base_java 1445 # GYP: //base.gyp:base_java
1449 android_library("base_java") { 1446 android_library("base_java") {
1450 srcjar_deps = [ 1447 srcjar_deps = [
1451 ":base_android_java_enums_srcjar", 1448 ":base_android_java_enums_srcjar",
1452 ":base_native_libraries_gen", 1449 ":base_native_libraries_gen",
1453 ] 1450 ]
1454 1451
1455 deps = [ 1452 deps = [
1456 "//third_party/jsr-305:jsr_305_javalib" 1453 "//third_party/jsr-305:jsr_305_javalib",
1457 ] 1454 ]
1458 1455
1459 DEPRECATED_java_in_dir = "android/java/src" 1456 DEPRECATED_java_in_dir = "android/java/src"
1460 1457
1461 # A new version of NativeLibraries.java (with the actual correct values) 1458 # A new version of NativeLibraries.java (with the actual correct values)
1462 # will be created when creating an apk. 1459 # will be created when creating an apk.
1463 jar_excluded_patterns = [ 1460 jar_excluded_patterns = [
1464 "*/NativeLibraries.class", 1461 "*/NativeLibraries.class",
1465 "*/NativeLibraries##*.class", 1462 "*/NativeLibraries##*.class",
1466 ] 1463 ]
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 # GYP: //base/base.gyp:base_native_libraries_gen 1499 # GYP: //base/base.gyp:base_native_libraries_gen
1503 java_cpp_template("base_native_libraries_gen") { 1500 java_cpp_template("base_native_libraries_gen") {
1504 sources = [ 1501 sources = [
1505 "android/java/templates/NativeLibraries.template", 1502 "android/java/templates/NativeLibraries.template",
1506 ] 1503 ]
1507 package_name = "org/chromium/base/library_loader" 1504 package_name = "org/chromium/base/library_loader"
1508 } 1505 }
1509 1506
1510 # GYP: //base.gyp:base_java_unittest_support 1507 # GYP: //base.gyp:base_java_unittest_support
1511 android_library("base_java_unittest_support") { 1508 android_library("base_java_unittest_support") {
1512 deps = [":base_java"] 1509 deps = [
1513 java_files = [ 1510 ":base_java",
1514 "test/android/java/src/org/chromium/base/ContentUriTestUtils.java"
1515 ] 1511 ]
1512 java_files =
1513 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
1516 } 1514 }
1517 1515
1518 # GYP: //base.gyp:base_unittests_apk 1516 # GYP: //base.gyp:base_unittests_apk
1519 unittest_apk("base_unittests_apk") { 1517 unittest_apk("base_unittests_apk") {
1520 deps = [ 1518 deps = [
1521 ":base_java", 1519 ":base_java",
1522 ":base_java_unittest_support", 1520 ":base_java_unittest_support",
1523 ":base_unittests", 1521 ":base_unittests",
1524 ] 1522 ]
1525 unittests_dep = ":base_unittests" 1523 unittests_dep = ":base_unittests"
1526 } 1524 }
1527 } 1525 }
OLDNEW
« no previous file with comments | « DEPS ('k') | base/allocator/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698