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

Side by Side Diff: base/BUILD.gn

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Exclude certain files from jumbo because of a Windows problem Created 3 years, 3 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
« no previous file with comments | « no previous file | base/memory/discardable_memory_allocator.cc » ('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 # 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
11 # 11 #
12 # Since base includes so many low-level things that vary widely and 12 # Since base includes so many low-level things that vary widely and
13 # unpredictably for the various build types, we prefer a slightly different 13 # unpredictably for the various build types, we prefer a slightly different
14 # style. Instead, there are big per-platform blocks of inclusions and 14 # style. Instead, there are big per-platform blocks of inclusions and
15 # exclusions. If a given file has an inclusion or exclusion rule that applies 15 # exclusions. If a given file has an inclusion or exclusion rule that applies
16 # for multiple conditions, prefer to duplicate it in both lists. This makes it 16 # for multiple conditions, prefer to duplicate it in both lists. This makes it
17 # a bit easier to see which files apply in which cases rather than having a 17 # a bit easier to see which files apply in which cases rather than having a
18 # huge sequence of random-looking conditionals. 18 # huge sequence of random-looking conditionals.
19 19
20 import("//build/buildflag_header.gni") 20 import("//build/buildflag_header.gni")
21 import("//build/config/allocator.gni") 21 import("//build/config/allocator.gni")
22 import("//build/config/arm.gni") 22 import("//build/config/arm.gni")
23 import("//build/config/chromecast_build.gni") 23 import("//build/config/chromecast_build.gni")
24 import("//build/config/clang/clang.gni") 24 import("//build/config/clang/clang.gni")
25 import("//build/config/compiler/compiler.gni") 25 import("//build/config/compiler/compiler.gni")
26 import("//build/config/dcheck_always_on.gni") 26 import("//build/config/dcheck_always_on.gni")
27 import("//build/config/jumbo.gni")
27 import("//build/config/nacl/config.gni") 28 import("//build/config/nacl/config.gni")
28 import("//build/config/sysroot.gni") 29 import("//build/config/sysroot.gni")
29 import("//build/config/ui.gni") 30 import("//build/config/ui.gni")
30 import("//build/nocompile.gni") 31 import("//build/nocompile.gni")
31 import("//testing/libfuzzer/fuzzer_test.gni") 32 import("//testing/libfuzzer/fuzzer_test.gni")
32 import("//testing/test.gni") 33 import("//testing/test.gni")
33 34
34 declare_args() { 35 declare_args() {
35 # Override this value to give a specific build date. 36 # Override this value to give a specific build date.
36 # See //base/build_time.cc and //build/write_build_date_header.py for more 37 # See //base/build_time.cc and //build/write_build_date_header.py for more
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 # small parts of it are used in many different contexts. This combined with a 99 # small parts of it are used in many different contexts. This combined with a
99 # few static initializers floating around means that dead code stripping 100 # few static initializers floating around means that dead code stripping
100 # still leaves a lot of code behind that isn't always used. For example, this 101 # still leaves a lot of code behind that isn't always used. For example, this
101 # saves more than 40K for a smaller target like chrome_elf. 102 # saves more than 40K for a smaller target like chrome_elf.
102 # 103 #
103 # Use static libraries for the helper stuff as well like //base/debug since 104 # Use static libraries for the helper stuff as well like //base/debug since
104 # those things refer back to base code, which will force base compilation units 105 # those things refer back to base code, which will force base compilation units
105 # to be linked in where they wouldn't have otherwise. This does not include 106 # to be linked in where they wouldn't have otherwise. This does not include
106 # test code (test support and anything in the test directory) which should use 107 # test code (test support and anything in the test directory) which should use
107 # source_set as is recommended for GN targets). 108 # source_set as is recommended for GN targets).
108 component("base") { 109 jumbo_component("base") {
110 target_type = "component"
111 if (is_nacl) {
112 # Link errors related to malloc functions if libbase for nacl is
113 # compiled with jumbo.
114 never_build_jumbo = true
115 }
109 if (is_nacl_nonsfi) { 116 if (is_nacl_nonsfi) {
110 # TODO(phosek) bug 570839: If field_trial.cc is in a static library, 117 # TODO(phosek) bug 570839: If field_trial.cc is in a static library,
111 # nacl_helper_nonsfi doesn't link properly on Linux in debug builds. The 118 # nacl_helper_nonsfi doesn't link properly on Linux in debug builds. The
112 # reasons for this seem to involve obscure toolchain bugs. This should be 119 # reasons for this seem to involve obscure toolchain bugs. This should be
113 # fixed and this target should always be a static_library in the 120 # fixed and this target should always be a static_library in the
114 # non-component case. 121 # non-component case.
115 static_component_type = "source_set" 122 static_component_type = "source_set"
116 } 123 }
117 124
118 sources = [ 125 sources = [
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 ] 1135 ]
1129 1136
1130 # Needed for <atomic> if using newer C++ library than sysroot, except if 1137 # Needed for <atomic> if using newer C++ library than sysroot, except if
1131 # building inside the cros_sdk environment - use host_toolchain as a 1138 # building inside the cros_sdk environment - use host_toolchain as a
1132 # more robust check for this. 1139 # more robust check for this.
1133 if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) && 1140 if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) &&
1134 host_toolchain != "//build/toolchain/cros:host") { 1141 host_toolchain != "//build/toolchain/cros:host") {
1135 libs = [ "atomic" ] 1142 libs = [ "atomic" ]
1136 } 1143 }
1137 1144
1145 jumbo_excluded_sources = [
1146 # Works on a header without include guards: base/trace_event_common.h.
1147 "trace_event/trace_event_argument.cc",
1148 ]
1149
1150
1138 if (use_allocator_shim) { 1151 if (use_allocator_shim) {
1139 sources += [ 1152 sources += [
1140 "allocator/allocator_shim.cc", 1153 "allocator/allocator_shim.cc",
1141 "allocator/allocator_shim.h", 1154 "allocator/allocator_shim.h",
1142 "allocator/allocator_shim_internals.h", 1155 "allocator/allocator_shim_internals.h",
1143 "allocator/allocator_shim_override_cpp_symbols.h", 1156 "allocator/allocator_shim_override_cpp_symbols.h",
1144 "allocator/allocator_shim_override_libc_symbols.h", 1157 "allocator/allocator_shim_override_libc_symbols.h",
1145 ] 1158 ]
1159 jumbo_excluded_sources += [
1160 "allocator/allocator_shim.cc",
1161 ]
1146 if (is_win) { 1162 if (is_win) {
1147 sources += [ 1163 sources += [
1148 "allocator/allocator_shim_default_dispatch_to_winheap.cc", 1164 "allocator/allocator_shim_default_dispatch_to_winheap.cc",
1149 "allocator/allocator_shim_override_ucrt_symbols_win.h", 1165 "allocator/allocator_shim_override_ucrt_symbols_win.h",
1150 "allocator/winheap_stubs_win.cc", 1166 "allocator/winheap_stubs_win.cc",
1151 "allocator/winheap_stubs_win.h", 1167 "allocator/winheap_stubs_win.h",
1152 ] 1168 ]
1153 } else if (is_linux && use_allocator == "tcmalloc") { 1169 } else if (is_linux && use_allocator == "tcmalloc") {
1154 sources += [ 1170 sources += [
1155 "allocator/allocator_shim_default_dispatch_to_tcmalloc.cc", 1171 "allocator/allocator_shim_default_dispatch_to_tcmalloc.cc",
1156 "allocator/allocator_shim_override_glibc_weak_symbols.h", 1172 "allocator/allocator_shim_override_glibc_weak_symbols.h",
1157 ] 1173 ]
1158 deps += [ "//base/allocator:tcmalloc" ] 1174 deps += [ "//base/allocator:tcmalloc" ]
1159 } else if (is_linux && use_allocator == "none") { 1175 } else if (is_linux && use_allocator == "none") {
1160 sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ] 1176 sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
1161 } else if (is_android && use_allocator == "none") { 1177 } else if (is_android && use_allocator == "none") {
1162 sources += [ 1178 sources += [
1163 "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" , 1179 "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" ,
1164 "allocator/allocator_shim_override_linker_wrapped_symbols.h", 1180 "allocator/allocator_shim_override_linker_wrapped_symbols.h",
1165 ] 1181 ]
1166 all_dependent_configs += [ "//base/allocator:wrap_malloc_symbols" ] 1182 all_dependent_configs += [ "//base/allocator:wrap_malloc_symbols" ]
1183 jumbo_excluded_sources += [
1184 "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" ,
1185 ]
1167 } else if (is_mac) { 1186 } else if (is_mac) {
1168 sources += [ 1187 sources += [
1169 "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc", 1188 "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc",
1170 "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h", 1189 "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h",
1171 "allocator/allocator_shim_override_mac_symbols.h", 1190 "allocator/allocator_shim_override_mac_symbols.h",
1172 ] 1191 ]
1173 } 1192 }
1174 } 1193 }
1175 1194
1176 # Allow more direct string conversions on platforms with native utf8 1195 # Allow more direct string conversions on platforms with native utf8
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 } 2829 }
2811 2830
2812 fuzzer_test("base_json_correctness_fuzzer") { 2831 fuzzer_test("base_json_correctness_fuzzer") {
2813 sources = [ 2832 sources = [
2814 "json/correctness_fuzzer.cc", 2833 "json/correctness_fuzzer.cc",
2815 ] 2834 ]
2816 deps = [ 2835 deps = [
2817 ":base", 2836 ":base",
2818 ] 2837 ]
2819 } 2838 }
OLDNEW
« no previous file with comments | « no previous file | base/memory/discardable_memory_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698