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/allocator.gni") | 5 import("//build/config/allocator.gni") |
6 | 6 |
7 # Only executables and not libraries should depend on the allocator target; | 7 # Only executables and not libraries should depend on the allocator target; |
8 # only the application (the final executable) knows what allocator makes sense. | 8 # only the application (the final executable) knows what allocator makes sense. |
9 # This "allocator" meta-target will forward to the default allocator according | 9 # This "allocator" meta-target will forward to the default allocator according |
10 # to the build settings. | 10 # to the build settings. |
(...skipping 28 matching lines...) Expand all Loading... |
39 cpu_arch, | 39 cpu_arch, |
40 ] | 40 ] |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 if (use_allocator == "tcmalloc") { | 44 if (use_allocator == "tcmalloc") { |
45 # tcmalloc currently won't compile on Android. | 45 # tcmalloc currently won't compile on Android. |
46 source_set("tcmalloc") { | 46 source_set("tcmalloc") { |
47 tcmalloc_dir = "//third_party/tcmalloc/chromium" | 47 tcmalloc_dir = "//third_party/tcmalloc/chromium" |
48 | 48 |
| 49 # Don't check tcmalloc's includes. These files include various files like |
| 50 # base/foo.h and they actually refer to tcmalloc's forked copy of base |
| 51 # rather than the regular one, which confuses the header checker. |
| 52 check_includes = false |
| 53 |
49 sources = [ | 54 sources = [ |
50 # Generated for our configuration from tcmalloc"s build | 55 # Generated for our configuration from tcmalloc"s build |
51 # and checked in. | 56 # and checked in. |
52 "$tcmalloc_dir/src/config.h", | 57 "$tcmalloc_dir/src/config.h", |
53 "$tcmalloc_dir/src/config_android.h", | 58 "$tcmalloc_dir/src/config_android.h", |
54 "$tcmalloc_dir/src/config_linux.h", | 59 "$tcmalloc_dir/src/config_linux.h", |
55 "$tcmalloc_dir/src/config_win.h", | 60 "$tcmalloc_dir/src/config_win.h", |
56 | 61 |
57 # tcmalloc native and forked files. | 62 # tcmalloc native and forked files. |
58 "$tcmalloc_dir/src/base/abort.cc", | 63 "$tcmalloc_dir/src/base/abort.cc", |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 "$tcmalloc_dir/src/system-alloc.cc", | 132 "$tcmalloc_dir/src/system-alloc.cc", |
128 "$tcmalloc_dir/src/system-alloc.h", | 133 "$tcmalloc_dir/src/system-alloc.h", |
129 | 134 |
130 # #included by debugallocation_shim.cc | 135 # #included by debugallocation_shim.cc |
131 #"$tcmalloc_dir/src/tcmalloc.cc", | 136 #"$tcmalloc_dir/src/tcmalloc.cc", |
132 "$tcmalloc_dir/src/thread_cache.cc", | 137 "$tcmalloc_dir/src/thread_cache.cc", |
133 "$tcmalloc_dir/src/thread_cache.h", | 138 "$tcmalloc_dir/src/thread_cache.h", |
134 "$tcmalloc_dir/src/windows/port.cc", | 139 "$tcmalloc_dir/src/windows/port.cc", |
135 "$tcmalloc_dir/src/windows/port.h", | 140 "$tcmalloc_dir/src/windows/port.h", |
136 "allocator_shim.cc", | 141 "allocator_shim.cc", |
137 "allocator_shim.h", | |
138 "debugallocation_shim.cc", | 142 "debugallocation_shim.cc", |
139 | 143 |
140 # These are both #included by allocator_shim for maximal linking. | 144 # These are both #included by allocator_shim for maximal linking. |
141 #"generic_allocators.cc", | 145 #"generic_allocators.cc", |
142 #"win_allocator.cc", | 146 #"win_allocator.cc", |
143 ] | 147 ] |
144 | 148 |
145 # Disable the heap checker in tcmalloc. | 149 # Disable the heap checker in tcmalloc. |
146 defines = [ "NO_HEAP_CHECK" ] | 150 defines = [ "NO_HEAP_CHECK" ] |
147 | 151 |
(...skipping 21 matching lines...) Expand all Loading... |
169 "$tcmalloc_dir/src/symbolize.h", | 173 "$tcmalloc_dir/src/symbolize.h", |
170 "$tcmalloc_dir/src/system-alloc.cc", | 174 "$tcmalloc_dir/src/system-alloc.cc", |
171 "$tcmalloc_dir/src/system-alloc.h", | 175 "$tcmalloc_dir/src/system-alloc.h", |
172 | 176 |
173 # included by allocator_shim.cc | 177 # included by allocator_shim.cc |
174 "debugallocation_shim.cc", | 178 "debugallocation_shim.cc", |
175 | 179 |
176 # cpuprofiler | 180 # cpuprofiler |
177 "$tcmalloc_dir/src/base/thread_lister.c", | 181 "$tcmalloc_dir/src/base/thread_lister.c", |
178 "$tcmalloc_dir/src/base/thread_lister.h", | 182 "$tcmalloc_dir/src/base/thread_lister.h", |
| 183 "$tcmalloc_dir/src/profile-handler.cc", |
| 184 "$tcmalloc_dir/src/profile-handler.h", |
179 "$tcmalloc_dir/src/profiledata.cc", | 185 "$tcmalloc_dir/src/profiledata.cc", |
180 "$tcmalloc_dir/src/profiledata.h", | 186 "$tcmalloc_dir/src/profiledata.h", |
181 "$tcmalloc_dir/src/profile-handler.cc", | |
182 "$tcmalloc_dir/src/profile-handler.h", | |
183 "$tcmalloc_dir/src/profiler.cc", | 187 "$tcmalloc_dir/src/profiler.cc", |
184 ] | 188 ] |
185 defines += [ "PERFTOOLS_DLL_DECL=" ] | 189 defines += [ "PERFTOOLS_DLL_DECL=" ] |
186 | 190 |
187 configs -= [ | 191 configs -= [ |
188 # Tcmalloc defines this itself, and we don't want duplicate definition | 192 # Tcmalloc defines this itself, and we don't want duplicate definition |
189 # warnings. | 193 # warnings. |
190 "//build/config/win:nominmax", | 194 "//build/config/win:nominmax", |
191 ] | 195 ] |
192 | 196 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 visibility = [ "//base/*" ] | 250 visibility = [ "//base/*" ] |
247 sources = [ | 251 sources = [ |
248 "allocator_extension_thunks.cc", | 252 "allocator_extension_thunks.cc", |
249 "allocator_extension_thunks.h", | 253 "allocator_extension_thunks.h", |
250 ] | 254 ] |
251 if (is_android && !is_debug) { | 255 if (is_android && !is_debug) { |
252 configs -= [ "//build/config/compiler:optimize" ] | 256 configs -= [ "//build/config/compiler:optimize" ] |
253 configs += [ "//build/config/compiler:optimize_max" ] | 257 configs += [ "//build/config/compiler:optimize_max" ] |
254 } | 258 } |
255 } | 259 } |
OLD | NEW |