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/compiler/compiler.gni") | 5 import("//build/config/compiler/compiler.gni") |
| 6 import("//build/config/nacl/config.gni") |
6 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
7 import("//testing/test.gni") | 8 import("//testing/test.gni") |
8 | 9 |
9 if (is_android) { | 10 if (is_android) { |
10 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
11 } | 12 } |
12 | 13 |
13 config("base_flags") { | 14 config("base_flags") { |
14 if (is_clang) { | 15 if (is_clang) { |
15 cflags = [ | 16 cflags = [ |
(...skipping 13 matching lines...) Expand all Loading... |
29 # ldflags in GN aren't automatically inherited. | 30 # ldflags in GN aren't automatically inherited. |
30 config("base_win_linker_flags") { | 31 config("base_win_linker_flags") { |
31 ldflags = [ | 32 ldflags = [ |
32 "/DELAYLOAD:cfgmgr32.dll", | 33 "/DELAYLOAD:cfgmgr32.dll", |
33 "/DELAYLOAD:powrprof.dll", | 34 "/DELAYLOAD:powrprof.dll", |
34 "/DELAYLOAD:setupapi.dll", | 35 "/DELAYLOAD:setupapi.dll", |
35 ] | 36 ] |
36 } | 37 } |
37 } | 38 } |
38 | 39 |
| 40 if (is_nacl_nonsfi) { |
| 41 # Must be in a config because of how GN orders flags (otherwise -Wall will |
| 42 # appear after this, and turn it back on). |
| 43 config("nacl_nonsfi_warnings") { |
| 44 # file_util_posix.cc contains a function which is not |
| 45 # being used by nacl_helper_nonsfi. |
| 46 cflags = [ "-Wno-unused-function" ] |
| 47 } |
| 48 } |
| 49 |
39 source_set("base_paths") { | 50 source_set("base_paths") { |
40 sources = [ | 51 sources = [ |
41 "base_paths.cc", | 52 "base_paths.cc", |
42 "base_paths.h", | 53 "base_paths.h", |
43 "base_paths_android.cc", | 54 "base_paths_android.cc", |
44 "base_paths_android.h", | 55 "base_paths_android.h", |
45 "base_paths_mac.h", | 56 "base_paths_mac.h", |
46 "base_paths_mac.mm", | 57 "base_paths_mac.mm", |
47 "base_paths_posix.cc", | 58 "base_paths_posix.cc", |
48 "base_paths_posix.h", | 59 "base_paths_posix.h", |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 "files/file_path_watcher_stub.cc", | 750 "files/file_path_watcher_stub.cc", |
740 "sync_socket_nacl.cc", | 751 "sync_socket_nacl.cc", |
741 "threading/platform_thread_linux.cc", | 752 "threading/platform_thread_linux.cc", |
742 ] | 753 ] |
743 set_sources_assignment_filter(sources_assignment_filter) | 754 set_sources_assignment_filter(sources_assignment_filter) |
744 | 755 |
745 sources -= [ | 756 sources -= [ |
746 "cpu.cc", | 757 "cpu.cc", |
747 "files/file_enumerator_posix.cc", | 758 "files/file_enumerator_posix.cc", |
748 "files/file_proxy.cc", | 759 "files/file_proxy.cc", |
749 "files/file_util.cc", | |
750 "files/file_util_posix.cc", | |
751 "files/file_util_proxy.cc", | 760 "files/file_util_proxy.cc", |
752 "files/important_file_writer.cc", | 761 "files/important_file_writer.cc", |
753 "files/important_file_writer.h", | 762 "files/important_file_writer.h", |
754 "files/scoped_temp_dir.cc", | 763 "files/scoped_temp_dir.cc", |
755 "message_loop/message_pump_libevent.cc", | |
756 "native_library_posix.cc", | 764 "native_library_posix.cc", |
757 "path_service.cc", | 765 "path_service.cc", |
758 "rand_util_posix.cc", | |
759 "scoped_native_library.cc", | 766 "scoped_native_library.cc", |
760 "sync_socket_posix.cc", | 767 "sync_socket_posix.cc", |
761 "sys_info.cc", | 768 "sys_info.cc", |
762 "sys_info_posix.cc", | 769 "sys_info_posix.cc", |
763 ] | 770 ] |
| 771 |
| 772 if (is_nacl_nonsfi) { |
| 773 set_sources_assignment_filter([]) |
| 774 sources += [ "posix/unix_domain_socket_linux.cc" ] |
| 775 set_sources_assignment_filter(sources_assignment_filter) |
| 776 sources -= [ "rand_util_nacl.cc" ] |
| 777 configs += [ ":nacl_nonsfi_warnings" ] |
| 778 } else { |
| 779 sources -= [ |
| 780 "files/file_util.cc", |
| 781 "files/file_util.h", |
| 782 "files/file_util_posix.cc", |
| 783 "message_loop/message_pump_libevent.cc", |
| 784 "message_loop/message_pump_libevent.h", |
| 785 "rand_util_posix.cc", |
| 786 ] |
| 787 } |
764 } else { | 788 } else { |
765 # Remove NaCl stuff. | 789 # Remove NaCl stuff. |
766 sources -= [ | 790 sources -= [ |
767 "os_compat_nacl.cc", | 791 "os_compat_nacl.cc", |
768 "os_compat_nacl.h", | 792 "os_compat_nacl.h", |
769 "rand_util_nacl.cc", | 793 "rand_util_nacl.cc", |
770 ] | 794 ] |
771 } | 795 } |
772 | 796 |
773 # Windows. | 797 # Windows. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 837 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
814 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 838 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
815 | 839 |
816 libs = [ | 840 libs = [ |
817 "cfgmgr32.lib", | 841 "cfgmgr32.lib", |
818 "netapi32.lib", | 842 "netapi32.lib", |
819 "powrprof.lib", | 843 "powrprof.lib", |
820 "setupapi.lib", | 844 "setupapi.lib", |
821 ] | 845 ] |
822 all_dependent_configs = [ ":base_win_linker_flags" ] | 846 all_dependent_configs = [ ":base_win_linker_flags" ] |
823 } else if (!is_nacl) { | 847 } else if (!is_nacl || is_nacl_nonsfi) { |
824 # Non-Windows. | 848 # Non-Windows. |
825 deps += [ "//third_party/libevent" ] | 849 deps += [ "//third_party/libevent" ] |
826 } | 850 } |
827 | 851 |
828 # Mac. | 852 # Mac. |
829 if (is_mac || is_ios) { | 853 if (is_mac || is_ios) { |
830 # Common Desktop / iOS excludes | 854 # Common Desktop / iOS excludes |
831 sources -= [ | 855 sources -= [ |
832 "native_library_posix.cc", | 856 "native_library_posix.cc", |
833 "strings/sys_string_conversions_posix.cc", | 857 "strings/sys_string_conversions_posix.cc", |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1697 | 1721 |
1698 # GYP: //base.gyp:base_java_unittest_support | 1722 # GYP: //base.gyp:base_java_unittest_support |
1699 android_library("base_java_unittest_support") { | 1723 android_library("base_java_unittest_support") { |
1700 deps = [ | 1724 deps = [ |
1701 ":base_java", | 1725 ":base_java", |
1702 ] | 1726 ] |
1703 java_files = | 1727 java_files = |
1704 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] | 1728 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] |
1705 } | 1729 } |
1706 } | 1730 } |
OLD | NEW |