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 # HOW TO WRITE CONDITIONALS IN THIS FILE | 5 # HOW TO WRITE CONDITIONALS IN THIS FILE |
6 # ====================================== | 6 # ====================================== |
7 # | 7 # |
8 # In many other places, one would write a conditional that expresses all the | 8 # In many other places, one would write a conditional that expresses all the |
9 # cases when a source file is used or unused, and then either add or subtract | 9 # cases when a source file is used or unused, and then either add or subtract |
10 # it from the sources list in that case | 10 # it from the sources list in that case |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 if (is_nacl_nonsfi) { | 80 if (is_nacl_nonsfi) { |
81 # Must be in a config because of how GN orders flags (otherwise -Wall will | 81 # Must be in a config because of how GN orders flags (otherwise -Wall will |
82 # appear after this, and turn it back on). | 82 # appear after this, and turn it back on). |
83 config("nacl_nonsfi_warnings") { | 83 config("nacl_nonsfi_warnings") { |
84 # file_util_posix.cc contains a function which is not | 84 # file_util_posix.cc contains a function which is not |
85 # being used by nacl_helper_nonsfi. | 85 # being used by nacl_helper_nonsfi. |
86 cflags = [ "-Wno-unused-function" ] | 86 cflags = [ "-Wno-unused-function" ] |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 if (is_nacl) { | |
91 # None of the files apply to nacl, and we can't make an empty static library. | |
92 group("base_paths") { | |
93 } | |
94 } else { | |
95 static_library("base_paths") { | |
96 sources = [ | |
97 "base_paths.cc", | |
98 "base_paths.h", | |
99 "base_paths_android.cc", | |
100 "base_paths_android.h", | |
101 "base_paths_mac.h", | |
102 "base_paths_mac.mm", | |
103 "base_paths_posix.cc", | |
104 "base_paths_posix.h", | |
105 "base_paths_win.cc", | |
106 "base_paths_win.h", | |
107 ] | |
108 | |
109 if (is_android || is_mac || is_ios) { | |
110 sources -= [ "base_paths_posix.cc" ] | |
111 } | |
112 | |
113 configs += [ ":base_implementation" ] | |
114 | |
115 visibility = [ ":base" ] | |
116 } | |
117 } | |
118 | |
119 if (is_android) { | 90 if (is_android) { |
120 config("android_system_libs") { | 91 config("android_system_libs") { |
121 libs = [ "log" ] # Used by logging.cc. | 92 libs = [ "log" ] # Used by logging.cc. |
122 } | 93 } |
123 } | 94 } |
124 | 95 |
125 # Base and everything it depends on should be a static library rather than | 96 # Base and everything it depends on should be a static library rather than |
126 # a source set. Base is more of a "library" in the classic sense in that many | 97 # a source set. Base is more of a "library" in the classic sense in that many |
127 # small parts of it are used in many different contexts. This combined with a | 98 # small parts of it are used in many different contexts. This combined with a |
128 # few static initializers floating around means that dead code stripping | 99 # few static initializers floating around means that dead code stripping |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1107 "win/wait_chain.cc", | 1078 "win/wait_chain.cc", |
1108 "win/wait_chain.h", | 1079 "win/wait_chain.h", |
1109 "win/win_util.cc", | 1080 "win/win_util.cc", |
1110 "win/win_util.h", | 1081 "win/win_util.h", |
1111 "win/windows_version.cc", | 1082 "win/windows_version.cc", |
1112 "win/windows_version.h", | 1083 "win/windows_version.h", |
1113 "win/wrapped_window_proc.cc", | 1084 "win/wrapped_window_proc.cc", |
1114 "win/wrapped_window_proc.h", | 1085 "win/wrapped_window_proc.h", |
1115 ] | 1086 ] |
1116 | 1087 |
1088 if (!is_nacl) { | |
1089 sources += [ | |
1090 "base_paths.cc", | |
1091 "base_paths.h", | |
1092 "base_paths_android.cc", | |
1093 "base_paths_android.h", | |
1094 "base_paths_mac.h", | |
1095 "base_paths_mac.mm", | |
1096 "base_paths_posix.h", | |
1097 "base_paths_win.cc", | |
1098 "base_paths_win.h", | |
1099 ] | |
1100 | |
1101 if (is_linux) { | |
1102 sources += [ "base_paths_posix.cc" ] | |
1103 } | |
1104 } | |
1105 | |
1117 all_dependent_configs = [] | 1106 all_dependent_configs = [] |
1118 defines = [] | 1107 defines = [] |
1119 data = [] | 1108 data = [] |
1120 | 1109 |
1121 configs += [ | 1110 configs += [ |
1122 ":base_flags", | 1111 ":base_flags", |
1123 ":base_implementation", | 1112 ":base_implementation", |
1124 "//base/allocator:allocator_shim_define", # for allocator_check.cc. | 1113 "//base/allocator:allocator_shim_define", # for allocator_check.cc. |
1125 "//build/config:precompiled_headers", | 1114 "//build/config:precompiled_headers", |
1126 ] | 1115 ] |
1127 | 1116 |
1128 deps = [ | 1117 deps = [ |
1129 "//base/allocator", | 1118 "//base/allocator", |
1130 "//base/allocator:features", | 1119 "//base/allocator:features", |
1131 "//base/third_party/dynamic_annotations", | 1120 "//base/third_party/dynamic_annotations", |
1132 "//third_party/modp_b64", | 1121 "//third_party/modp_b64", |
1133 ] | 1122 ] |
1134 | 1123 |
1135 public_deps = [ | 1124 public_deps = [ |
1136 ":base_paths", | |
1137 ":base_static", | 1125 ":base_static", |
1138 ":build_date", | 1126 ":build_date", |
1139 ":debugging_flags", | 1127 ":debugging_flags", |
1140 ] | 1128 ] |
1141 | 1129 |
1142 # Needed for <atomic> if using newer C++ library than sysroot | 1130 # Needed for <atomic> if using newer C++ library than sysroot |
1143 if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) { | 1131 if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) { |
1144 libs = [ "atomic" ] | 1132 libs = [ "atomic" ] |
1145 } | 1133 } |
1146 | 1134 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1624 data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ] | 1612 data += [ "//third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer" ] |
1625 } | 1613 } |
1626 } | 1614 } |
1627 | 1615 |
1628 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 1616 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
1629 if (!is_debug) { | 1617 if (!is_debug) { |
1630 configs -= [ "//build/config/compiler:default_optimization" ] | 1618 configs -= [ "//build/config/compiler:default_optimization" ] |
1631 configs += [ "//build/config/compiler:optimize_max" ] | 1619 configs += [ "//build/config/compiler:optimize_max" ] |
1632 } | 1620 } |
1633 | 1621 |
1634 allow_circular_includes_from = public_deps | 1622 allow_circular_includes_from = public_deps |
Wez
2017/04/05 22:18:25
As discussed, this GN check hint seems masked the
| |
1635 } | 1623 } |
1636 | 1624 |
1637 buildflag_header("debugging_flags") { | 1625 buildflag_header("debugging_flags") { |
1638 header = "debugging_flags.h" | 1626 header = "debugging_flags.h" |
1639 header_dir = "base/debug" | 1627 header_dir = "base/debug" |
1640 flags = [ | 1628 flags = [ |
1641 "ENABLE_PROFILING=$enable_profiling", | 1629 "ENABLE_PROFILING=$enable_profiling", |
1642 "ENABLE_MEMORY_TASK_PROFILER=$enable_memory_task_profiler", | 1630 "ENABLE_MEMORY_TASK_PROFILER=$enable_memory_task_profiler", |
1643 ] | 1631 ] |
1644 } | 1632 } |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2700 } | 2688 } |
2701 | 2689 |
2702 fuzzer_test("base_json_correctness_fuzzer") { | 2690 fuzzer_test("base_json_correctness_fuzzer") { |
2703 sources = [ | 2691 sources = [ |
2704 "json/correctness_fuzzer.cc", | 2692 "json/correctness_fuzzer.cc", |
2705 ] | 2693 ] |
2706 deps = [ | 2694 deps = [ |
2707 ":base", | 2695 ":base", |
2708 ] | 2696 ] |
2709 } | 2697 } |
OLD | NEW |