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

Side by Side Diff: base/BUILD.gn

Issue 1395573003: Build nacl_helper_nonsfi with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set cflags locally rather than globally Created 5 years, 1 month 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 | « no previous file | base/process/BUILD.gn » ('j') | build/config/compiler/BUILD.gn » ('J')
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/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_implementation") { 14 config("base_implementation") {
14 defines = [ "BASE_IMPLEMENTATION" ] 15 defines = [ "BASE_IMPLEMENTATION" ]
15 } 16 }
16 17
17 if (is_win) { 18 if (is_win) {
18 # This is in a separate config so the flags can be applied to dependents. 19 # This is in a separate config so the flags can be applied to dependents.
19 # ldflags in GN aren't automatically inherited. 20 # ldflags in GN aren't automatically inherited.
20 config("base_win_linker_flags") { 21 config("base_win_linker_flags") {
21 ldflags = [ 22 ldflags = [
22 "/DELAYLOAD:cfgmgr32.dll", 23 "/DELAYLOAD:cfgmgr32.dll",
23 "/DELAYLOAD:powrprof.dll", 24 "/DELAYLOAD:powrprof.dll",
24 "/DELAYLOAD:setupapi.dll", 25 "/DELAYLOAD:setupapi.dll",
25 ] 26 ]
26 } 27 }
27 } 28 }
28 29
30 if (is_nacl_nonsfi) {
31 # Must be in a config because of how GN orders flags (otherwise -Wall will
32 # appear after this, and turn it back on).
33 config("clang_warnings") {
brettw 2015/10/25 08:45:33 You just copy-and-pasted the old config name :) T
Petr Hosek 2015/10/25 22:50:48 Yes and no, I kept the name because it's in fact a
34 # file_util_posix.cc contains a function which is not
35 # being used by nacl_helper_nonsfi.
36 cflags = [ "-Wno-unused-function" ]
37 }
38 }
39
29 source_set("base_paths") { 40 source_set("base_paths") {
30 sources = [ 41 sources = [
31 "base_paths.cc", 42 "base_paths.cc",
32 "base_paths.h", 43 "base_paths.h",
33 "base_paths_android.cc", 44 "base_paths_android.cc",
34 "base_paths_android.h", 45 "base_paths_android.h",
35 "base_paths_mac.h", 46 "base_paths_mac.h",
36 "base_paths_mac.mm", 47 "base_paths_mac.mm",
37 "base_paths_posix.cc", 48 "base_paths_posix.cc",
38 "base_paths_posix.h", 49 "base_paths_posix.h",
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 "files/file_path_watcher_stub.cc", 739 "files/file_path_watcher_stub.cc",
729 "sync_socket_nacl.cc", 740 "sync_socket_nacl.cc",
730 "threading/platform_thread_linux.cc", 741 "threading/platform_thread_linux.cc",
731 ] 742 ]
732 set_sources_assignment_filter(sources_assignment_filter) 743 set_sources_assignment_filter(sources_assignment_filter)
733 744
734 sources -= [ 745 sources -= [
735 "cpu.cc", 746 "cpu.cc",
736 "files/file_enumerator_posix.cc", 747 "files/file_enumerator_posix.cc",
737 "files/file_proxy.cc", 748 "files/file_proxy.cc",
738 "files/file_util.cc",
739 "files/file_util_posix.cc",
740 "files/file_util_proxy.cc", 749 "files/file_util_proxy.cc",
741 "files/important_file_writer.cc", 750 "files/important_file_writer.cc",
742 "files/important_file_writer.h", 751 "files/important_file_writer.h",
743 "files/scoped_temp_dir.cc", 752 "files/scoped_temp_dir.cc",
744 "message_loop/message_pump_libevent.cc",
745 "native_library_posix.cc", 753 "native_library_posix.cc",
746 "path_service.cc", 754 "path_service.cc",
747 "rand_util_posix.cc",
748 "scoped_native_library.cc", 755 "scoped_native_library.cc",
749 "sync_socket_posix.cc", 756 "sync_socket_posix.cc",
750 "sys_info.cc", 757 "sys_info.cc",
751 "sys_info_posix.cc", 758 "sys_info_posix.cc",
752 ] 759 ]
760
761 if (is_nacl_nonsfi) {
762 set_sources_assignment_filter([])
763 sources += [ "posix/unix_domain_socket_linux.cc" ]
764 set_sources_assignment_filter(sources_assignment_filter)
765 sources -= [ "rand_util_nacl.cc" ]
766 configs += [ ":clang_warnings" ]
767 } else {
768 sources -= [
769 "files/file_util.cc",
770 "files/file_util.h",
771 "files/file_util_posix.cc",
772 "message_loop/message_pump_libevent.cc",
773 "message_loop/message_pump_libevent.h",
774 "rand_util_posix.cc",
775 ]
776 }
753 } else { 777 } else {
754 # Remove NaCl stuff. 778 # Remove NaCl stuff.
755 sources -= [ 779 sources -= [
756 "os_compat_nacl.cc", 780 "os_compat_nacl.cc",
757 "os_compat_nacl.h", 781 "os_compat_nacl.h",
758 "rand_util_nacl.cc", 782 "rand_util_nacl.cc",
759 ] 783 ]
760 } 784 }
761 785
762 # Windows. 786 # Windows.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 826 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
803 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 827 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
804 828
805 libs = [ 829 libs = [
806 "cfgmgr32.lib", 830 "cfgmgr32.lib",
807 "netapi32.lib", 831 "netapi32.lib",
808 "powrprof.lib", 832 "powrprof.lib",
809 "setupapi.lib", 833 "setupapi.lib",
810 ] 834 ]
811 all_dependent_configs = [ ":base_win_linker_flags" ] 835 all_dependent_configs = [ ":base_win_linker_flags" ]
812 } else if (!is_nacl) { 836 } else if (!is_nacl || is_nacl_nonsfi) {
813 # Non-Windows. 837 # Non-Windows.
814 deps += [ "//third_party/libevent" ] 838 deps += [ "//third_party/libevent" ]
815 } 839 }
816 840
817 # Mac. 841 # Mac.
818 if (is_mac || is_ios) { 842 if (is_mac || is_ios) {
819 # Common Desktop / iOS excludes 843 # Common Desktop / iOS excludes
820 sources -= [ 844 sources -= [
821 "native_library_posix.cc", 845 "native_library_posix.cc",
822 "strings/sys_string_conversions_posix.cc", 846 "strings/sys_string_conversions_posix.cc",
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 1710
1687 # GYP: //base.gyp:base_java_unittest_support 1711 # GYP: //base.gyp:base_java_unittest_support
1688 android_library("base_java_unittest_support") { 1712 android_library("base_java_unittest_support") {
1689 deps = [ 1713 deps = [
1690 ":base_java", 1714 ":base_java",
1691 ] 1715 ]
1692 java_files = 1716 java_files =
1693 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ] 1717 [ "test/android/java/src/org/chromium/base/ContentUriTestUtils.java" ]
1694 } 1718 }
1695 } 1719 }
OLDNEW
« no previous file with comments | « no previous file | base/process/BUILD.gn » ('j') | build/config/compiler/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698