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/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/allocator.gni") | 6 import("//build/config/allocator.gni") |
7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Provide a way to force disable debugallocation in Debug builds, | 10 # Provide a way to force disable debugallocation in Debug builds, |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 ] | 229 ] |
230 | 230 |
231 # We enable all warnings by default, but upstream disables a few. | 231 # We enable all warnings by default, but upstream disables a few. |
232 # Keep "-Wno-*" flags in sync with upstream by comparing against: | 232 # Keep "-Wno-*" flags in sync with upstream by comparing against: |
233 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.a
m | 233 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.a
m |
234 cflags = [ | 234 cflags = [ |
235 "-Wno-sign-compare", | 235 "-Wno-sign-compare", |
236 "-Wno-unused-result", | 236 "-Wno-unused-result", |
237 ] | 237 ] |
238 | 238 |
239 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | 239 # Compiling tcmalloc with -fvisibility=default is only necessary when |
240 configs += [ "//build/config/gcc:symbol_visibility_default" ] | 240 # not using the allocator shim, which provides the correct visibility |
| 241 # annotations for those symbols which need to be exported (see |
| 242 # //base/allocator/allocator_shim_override_glibc_weak_symbols.h and |
| 243 # //base/allocator/allocator_shim_internals.h for the definition of |
| 244 # SHIM_ALWAYS_EXPORT). |
| 245 if (!use_experimental_allocator_shim) { |
| 246 configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] |
| 247 configs += [ "//build/config/gcc:symbol_visibility_default" ] |
| 248 } |
241 | 249 |
242 ldflags = [ | 250 ldflags = [ |
243 # Don't let linker rip this symbol out, otherwise the heap&cpu | 251 # Don't let linker rip this symbol out, otherwise the heap&cpu |
244 # profilers will not initialize properly on startup. | 252 # profilers will not initialize properly on startup. |
245 "-Wl,-uIsHeapProfilerRunning,-uProfilerStart", | 253 "-Wl,-uIsHeapProfilerRunning,-uProfilerStart", |
246 | 254 |
247 # Do the same for heap leak checker. | 255 # Do the same for heap leak checker. |
248 "-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_j
iiix,-u_Z22InitialMallocHook_SbrkPKvi", | 256 "-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_j
iiix,-u_Z22InitialMallocHook_SbrkPKvi", |
249 "-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_m
iiil,-u_Z22InitialMallocHook_SbrkPKvl", | 257 "-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_m
iiil,-u_Z22InitialMallocHook_SbrkPKvl", |
250 "-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14Un
IgnoreObjectEPKv", | 258 "-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14Un
IgnoreObjectEPKv", |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] | 314 sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ] |
307 } else if (is_android && use_allocator == "none") { | 315 } else if (is_android && use_allocator == "none") { |
308 sources += [ | 316 sources += [ |
309 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", | 317 "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc", |
310 "allocator_shim_override_linker_wrapped_symbols.h", | 318 "allocator_shim_override_linker_wrapped_symbols.h", |
311 ] | 319 ] |
312 all_dependent_configs = [ ":wrap_malloc_symbols" ] | 320 all_dependent_configs = [ ":wrap_malloc_symbols" ] |
313 } | 321 } |
314 } | 322 } |
315 } | 323 } |
OLD | NEW |