summaryrefslogtreecommitdiffstats
path: root/base/allocator
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 07:03:50 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-21 07:03:50 +0000
commit3498bb4642c3b2ec841e7464ca35db3eb48eb1c0 (patch)
tree9979a7fb17f4671d4e00f5f57b6927f4bf762356 /base/allocator
parent65041fa2a7d79cbd289d6bfa05a55bfb32ec4fa3 (diff)
downloadchromium_src-3498bb4642c3b2ec841e7464ca35db3eb48eb1c0.zip
chromium_src-3498bb4642c3b2ec841e7464ca35db3eb48eb1c0.tar.gz
chromium_src-3498bb4642c3b2ec841e7464ca35db3eb48eb1c0.tar.bz2
Linux: Add libunwind as a dependency of tcmalloc in 64 bit mode.
Based on willchan's patch here: http://codereview.chromium.org/2109009/show BUG=40149 TEST=none TBR=willchan Review URL: http://codereview.chromium.org/2137010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/allocator')
-rw-r--r--base/allocator/allocator.gyp24
1 files changed, 21 insertions, 3 deletions
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index a1ad04d..033161e 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -1,4 +1,4 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -178,7 +178,7 @@
'allocator_shim.cc',
'generic_allocators.cc',
- 'win_allocator.cc',
+ 'win_allocator.cc',
],
# sources! means that these are not compiled directly.
'sources!': [
@@ -224,7 +224,6 @@
'<(tcmalloc_dir)/src/stacktrace_libunwind-inl.h',
'<(tcmalloc_dir)/src/stacktrace_powerpc-inl.h',
'<(tcmalloc_dir)/src/stacktrace_win32-inl.h',
- '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
'<(tcmalloc_dir)/src/stacktrace_x86-inl.h',
'<(tcmalloc_dir)/src/stacktrace_x86_64-inl.h',
'<(tcmalloc_dir)/src/tcmalloc_guard.h',
@@ -284,6 +283,7 @@
'<(tcmalloc_dir)/src/base/vdso_support.h',
'<(tcmalloc_dir)/src/maybe_threads.cc',
'<(tcmalloc_dir)/src/maybe_threads.h',
+ '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
'<(tcmalloc_dir)/src/symbolize.h',
'<(tcmalloc_dir)/src/system-alloc.cc',
'<(tcmalloc_dir)/src/system-alloc.h',
@@ -339,6 +339,24 @@
'-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
'-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
]},
+ 'conditions': [
+ # In 64 bit mode, use libunwind to get stacktraces in TCMalloc if we
+ # don't have the frame pointer.
+ # gcc will disable the frame pointer for O2 optimized 64 bit build.
+ [ 'target_arch=="x64"', {
+ 'configurations': {
+ 'Release_Base': {
+ 'defines': [
+ 'NO_FRAME_POINTER',
+ 'HAVE_LIBUNWIND_H=1',
+ ],
+ },
+ },
+ 'dependencies': [
+ '../../third_party/libunwind/libunwind.gyp:libunwind',
+ ],
+ }],
+ ],
}],
[ 'linux_use_debugallocation==1', {
'sources!': [