1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 'jemalloc_dir': '../../third_party/jemalloc/chromium',
8 'tcmalloc_dir': '../../third_party/tcmalloc/chromium',
9 'use_vtable_verify%': 0,
12 # Only executables and not libraries should depend on the
13 # allocator target; only the application (the final executable)
14 # knows what allocator makes sense.
16 'target_name': 'allocator',
17 'type': 'static_library',
18 # Make sure the allocation library is optimized to
19 # the hilt in official builds.
25 '<(tcmalloc_dir)/src/base',
26 '<(tcmalloc_dir)/src',
29 'direct_dependent_settings': {
34 'IgnoreDefaultLibraryNames': ['libcmtd.lib', 'libcmt.lib'],
35 'AdditionalDependencies': [
36 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib'
45 'PERFTOOLS_DLL_DECL=',
51 # Generated for our configuration from tcmalloc's build
53 '<(tcmalloc_dir)/src/config.h',
54 '<(tcmalloc_dir)/src/config_android.h',
55 '<(tcmalloc_dir)/src/config_linux.h',
56 '<(tcmalloc_dir)/src/config_win.h',
58 # all tcmalloc native and forked files
59 '<(tcmalloc_dir)/src/addressmap-inl.h',
60 '<(tcmalloc_dir)/src/base/abort.cc',
61 '<(tcmalloc_dir)/src/base/abort.h',
62 '<(tcmalloc_dir)/src/base/arm_instruction_set_select.h',
63 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h',
64 '<(tcmalloc_dir)/src/base/atomicops-internals-arm-generic.h',
65 '<(tcmalloc_dir)/src/base/atomicops-internals-arm-v6plus.h',
66 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h',
67 '<(tcmalloc_dir)/src/base/atomicops-internals-windows.h',
68 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc',
69 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h',
70 '<(tcmalloc_dir)/src/base/atomicops.h',
71 '<(tcmalloc_dir)/src/base/basictypes.h',
72 '<(tcmalloc_dir)/src/base/commandlineflags.h',
73 '<(tcmalloc_dir)/src/base/cycleclock.h',
74 # We don't list dynamic_annotations.c since its copy is already
75 # present in the dynamic_annotations target.
76 '<(tcmalloc_dir)/src/base/dynamic_annotations.h',
77 '<(tcmalloc_dir)/src/base/elf_mem_image.cc',
78 '<(tcmalloc_dir)/src/base/elf_mem_image.h',
79 '<(tcmalloc_dir)/src/base/elfcore.h',
80 '<(tcmalloc_dir)/src/base/googleinit.h',
81 '<(tcmalloc_dir)/src/base/linux_syscall_support.h',
82 '<(tcmalloc_dir)/src/base/linuxthreads.cc',
83 '<(tcmalloc_dir)/src/base/linuxthreads.h',
84 '<(tcmalloc_dir)/src/base/logging.cc',
85 '<(tcmalloc_dir)/src/base/logging.h',
86 '<(tcmalloc_dir)/src/base/low_level_alloc.cc',
87 '<(tcmalloc_dir)/src/base/low_level_alloc.h',
88 '<(tcmalloc_dir)/src/base/simple_mutex.h',
89 '<(tcmalloc_dir)/src/base/spinlock.cc',
90 '<(tcmalloc_dir)/src/base/spinlock.h',
91 '<(tcmalloc_dir)/src/base/spinlock_internal.cc',
92 '<(tcmalloc_dir)/src/base/spinlock_internal.h',
93 '<(tcmalloc_dir)/src/base/spinlock_linux-inl.h',
94 '<(tcmalloc_dir)/src/base/spinlock_posix-inl.h',
95 '<(tcmalloc_dir)/src/base/spinlock_win32-inl.h',
96 '<(tcmalloc_dir)/src/base/stl_allocator.h',
97 '<(tcmalloc_dir)/src/base/synchronization_profiling.h',
98 '<(tcmalloc_dir)/src/base/sysinfo.cc',
99 '<(tcmalloc_dir)/src/base/sysinfo.h',
100 '<(tcmalloc_dir)/src/base/thread_annotations.h',
101 '<(tcmalloc_dir)/src/base/thread_lister.c',
102 '<(tcmalloc_dir)/src/base/thread_lister.h',
103 '<(tcmalloc_dir)/src/base/vdso_support.cc',
104 '<(tcmalloc_dir)/src/base/vdso_support.h',
105 '<(tcmalloc_dir)/src/central_freelist.cc',
106 '<(tcmalloc_dir)/src/central_freelist.h',
107 '<(tcmalloc_dir)/src/common.cc',
108 '<(tcmalloc_dir)/src/common.h',
109 '<(tcmalloc_dir)/src/debugallocation.cc',
110 '<(tcmalloc_dir)/src/deep-heap-profile.cc',
111 '<(tcmalloc_dir)/src/deep-heap-profile.h',
112 '<(tcmalloc_dir)/src/free_list.cc',
113 '<(tcmalloc_dir)/src/free_list.h',
114 '<(tcmalloc_dir)/src/getpc.h',
115 '<(tcmalloc_dir)/src/gperftools/heap-checker.h',
116 '<(tcmalloc_dir)/src/gperftools/heap-profiler.h',
117 '<(tcmalloc_dir)/src/gperftools/malloc_extension.h',
118 '<(tcmalloc_dir)/src/gperftools/malloc_extension_c.h',
119 '<(tcmalloc_dir)/src/gperftools/malloc_hook.h',
120 '<(tcmalloc_dir)/src/gperftools/malloc_hook_c.h',
121 '<(tcmalloc_dir)/src/gperftools/profiler.h',
122 '<(tcmalloc_dir)/src/gperftools/stacktrace.h',
123 '<(tcmalloc_dir)/src/gperftools/tcmalloc.h',
124 '<(tcmalloc_dir)/src/heap-checker-bcad.cc',
125 '<(tcmalloc_dir)/src/heap-checker.cc',
126 '<(tcmalloc_dir)/src/heap-profile-table.cc',
127 '<(tcmalloc_dir)/src/heap-profile-table.h',
128 '<(tcmalloc_dir)/src/heap-profiler.cc',
129 '<(tcmalloc_dir)/src/internal_logging.cc',
130 '<(tcmalloc_dir)/src/internal_logging.h',
131 '<(tcmalloc_dir)/src/libc_override.h',
132 '<(tcmalloc_dir)/src/libc_override_gcc_and_weak.h',
133 '<(tcmalloc_dir)/src/libc_override_glibc.h',
134 '<(tcmalloc_dir)/src/libc_override_osx.h',
135 '<(tcmalloc_dir)/src/libc_override_redefine.h',
136 '<(tcmalloc_dir)/src/linked_list.h',
137 '<(tcmalloc_dir)/src/malloc_extension.cc',
138 '<(tcmalloc_dir)/src/malloc_hook-inl.h',
139 '<(tcmalloc_dir)/src/malloc_hook.cc',
140 '<(tcmalloc_dir)/src/malloc_hook_mmap_freebsd.h',
141 '<(tcmalloc_dir)/src/malloc_hook_mmap_linux.h',
142 '<(tcmalloc_dir)/src/maybe_threads.cc',
143 '<(tcmalloc_dir)/src/maybe_threads.h',
144 '<(tcmalloc_dir)/src/memfs_malloc.cc',
145 '<(tcmalloc_dir)/src/memory_region_map.cc',
146 '<(tcmalloc_dir)/src/memory_region_map.h',
147 '<(tcmalloc_dir)/src/packed-cache-inl.h',
148 '<(tcmalloc_dir)/src/page_heap.cc',
149 '<(tcmalloc_dir)/src/page_heap.h',
150 '<(tcmalloc_dir)/src/page_heap_allocator.h',
151 '<(tcmalloc_dir)/src/pagemap.h',
152 '<(tcmalloc_dir)/src/profile-handler.cc',
153 '<(tcmalloc_dir)/src/profile-handler.h',
154 '<(tcmalloc_dir)/src/profiledata.cc',
155 '<(tcmalloc_dir)/src/profiledata.h',
156 '<(tcmalloc_dir)/src/profiler.cc',
157 '<(tcmalloc_dir)/src/raw_printer.cc',
158 '<(tcmalloc_dir)/src/raw_printer.h',
159 '<(tcmalloc_dir)/src/sampler.cc',
160 '<(tcmalloc_dir)/src/sampler.h',
161 '<(tcmalloc_dir)/src/span.cc',
162 '<(tcmalloc_dir)/src/span.h',
163 '<(tcmalloc_dir)/src/stack_trace_table.cc',
164 '<(tcmalloc_dir)/src/stack_trace_table.h',
165 '<(tcmalloc_dir)/src/stacktrace.cc',
166 '<(tcmalloc_dir)/src/stacktrace_arm-inl.h',
167 '<(tcmalloc_dir)/src/stacktrace_config.h',
168 '<(tcmalloc_dir)/src/stacktrace_generic-inl.h',
169 '<(tcmalloc_dir)/src/stacktrace_libunwind-inl.h',
170 '<(tcmalloc_dir)/src/stacktrace_powerpc-inl.h',
171 '<(tcmalloc_dir)/src/stacktrace_win32-inl.h',
172 '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
173 '<(tcmalloc_dir)/src/stacktrace_x86-inl.h',
174 '<(tcmalloc_dir)/src/static_vars.cc',
175 '<(tcmalloc_dir)/src/static_vars.h',
176 '<(tcmalloc_dir)/src/symbolize.cc',
177 '<(tcmalloc_dir)/src/symbolize.h',
178 '<(tcmalloc_dir)/src/system-alloc.cc',
179 '<(tcmalloc_dir)/src/system-alloc.h',
180 '<(tcmalloc_dir)/src/tcmalloc.cc',
181 '<(tcmalloc_dir)/src/tcmalloc_guard.h',
182 '<(tcmalloc_dir)/src/thread_cache.cc',
183 '<(tcmalloc_dir)/src/thread_cache.h',
184 '<(tcmalloc_dir)/src/windows/config.h',
185 '<(tcmalloc_dir)/src/windows/get_mangled_names.cc',
186 '<(tcmalloc_dir)/src/windows/gperftools/tcmalloc.h',
187 '<(tcmalloc_dir)/src/windows/ia32_modrm_map.cc',
188 '<(tcmalloc_dir)/src/windows/ia32_opcode_map.cc',
189 '<(tcmalloc_dir)/src/windows/mingw.h',
190 '<(tcmalloc_dir)/src/windows/mini_disassembler.cc',
191 '<(tcmalloc_dir)/src/windows/mini_disassembler.h',
192 '<(tcmalloc_dir)/src/windows/mini_disassembler_types.h',
193 '<(tcmalloc_dir)/src/windows/override_functions.cc',
194 '<(tcmalloc_dir)/src/windows/patch_functions.cc',
195 '<(tcmalloc_dir)/src/windows/port.cc',
196 '<(tcmalloc_dir)/src/windows/port.h',
197 '<(tcmalloc_dir)/src/windows/preamble_patcher.cc',
198 '<(tcmalloc_dir)/src/windows/preamble_patcher.h',
199 '<(tcmalloc_dir)/src/windows/preamble_patcher_with_stub.cc',
202 '<(jemalloc_dir)/jemalloc.c',
203 '<(jemalloc_dir)/jemalloc.h',
204 '<(jemalloc_dir)/ql.h',
205 '<(jemalloc_dir)/qr.h',
206 '<(jemalloc_dir)/rb.h',
210 'debugallocation_shim.cc',
211 'generic_allocators.cc',
214 # sources! means that these are not compiled directly.
216 # Included by allocator_shim.cc for maximal inlining.
217 'generic_allocators.cc',
220 # Included by debugallocation_shim.cc.
221 '<(tcmalloc_dir)/src/debugallocation.cc',
222 '<(tcmalloc_dir)/src/tcmalloc.cc',
224 # We simply don't use these, but list them above so that IDE
225 # users can view the full available source for reference, etc.
226 '<(tcmalloc_dir)/src/addressmap-inl.h',
227 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h',
228 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h',
229 '<(tcmalloc_dir)/src/base/atomicops-internals-x86-msvc.h',
230 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc',
231 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h',
232 '<(tcmalloc_dir)/src/base/atomicops.h',
233 '<(tcmalloc_dir)/src/base/basictypes.h',
234 '<(tcmalloc_dir)/src/base/commandlineflags.h',
235 '<(tcmalloc_dir)/src/base/cycleclock.h',
236 '<(tcmalloc_dir)/src/base/elf_mem_image.h',
237 '<(tcmalloc_dir)/src/base/elfcore.h',
238 '<(tcmalloc_dir)/src/base/googleinit.h',
239 '<(tcmalloc_dir)/src/base/linux_syscall_support.h',
240 '<(tcmalloc_dir)/src/base/simple_mutex.h',
241 '<(tcmalloc_dir)/src/base/spinlock_linux-inl.h',
242 '<(tcmalloc_dir)/src/base/spinlock_posix-inl.h',
243 '<(tcmalloc_dir)/src/base/spinlock_win32-inl.h',
244 '<(tcmalloc_dir)/src/base/stl_allocator.h',
245 '<(tcmalloc_dir)/src/base/thread_annotations.h',
246 '<(tcmalloc_dir)/src/getpc.h',
247 '<(tcmalloc_dir)/src/gperftools/heap-checker.h',
248 '<(tcmalloc_dir)/src/gperftools/heap-profiler.h',
249 '<(tcmalloc_dir)/src/gperftools/malloc_extension.h',
250 '<(tcmalloc_dir)/src/gperftools/malloc_extension_c.h',
251 '<(tcmalloc_dir)/src/gperftools/malloc_hook.h',
252 '<(tcmalloc_dir)/src/gperftools/malloc_hook_c.h',
253 '<(tcmalloc_dir)/src/gperftools/profiler.h',
254 '<(tcmalloc_dir)/src/gperftools/stacktrace.h',
255 '<(tcmalloc_dir)/src/gperftools/tcmalloc.h',
256 '<(tcmalloc_dir)/src/libc_override.h',
257 '<(tcmalloc_dir)/src/libc_override_gcc_and_weak.h',
258 '<(tcmalloc_dir)/src/libc_override_glibc.h',
259 '<(tcmalloc_dir)/src/libc_override_osx.h',
260 '<(tcmalloc_dir)/src/libc_override_redefine.h',
261 '<(tcmalloc_dir)/src/malloc_hook_mmap_freebsd.h',
262 '<(tcmalloc_dir)/src/malloc_hook_mmap_linux.h',
263 '<(tcmalloc_dir)/src/memfs_malloc.cc',
264 '<(tcmalloc_dir)/src/packed-cache-inl.h',
265 '<(tcmalloc_dir)/src/page_heap_allocator.h',
266 '<(tcmalloc_dir)/src/pagemap.h',
267 '<(tcmalloc_dir)/src/stacktrace_arm-inl.h',
268 '<(tcmalloc_dir)/src/stacktrace_config.h',
269 '<(tcmalloc_dir)/src/stacktrace_generic-inl.h',
270 '<(tcmalloc_dir)/src/stacktrace_libunwind-inl.h',
271 '<(tcmalloc_dir)/src/stacktrace_powerpc-inl.h',
272 '<(tcmalloc_dir)/src/stacktrace_win32-inl.h',
273 '<(tcmalloc_dir)/src/stacktrace_with_context.cc',
274 '<(tcmalloc_dir)/src/stacktrace_x86-inl.h',
275 '<(tcmalloc_dir)/src/tcmalloc_guard.h',
276 '<(tcmalloc_dir)/src/windows/config.h',
277 '<(tcmalloc_dir)/src/windows/gperftools/tcmalloc.h',
278 '<(tcmalloc_dir)/src/windows/get_mangled_names.cc',
279 '<(tcmalloc_dir)/src/windows/ia32_modrm_map.cc',
280 '<(tcmalloc_dir)/src/windows/ia32_opcode_map.cc',
281 '<(tcmalloc_dir)/src/windows/mingw.h',
282 '<(tcmalloc_dir)/src/windows/mini_disassembler.cc',
283 '<(tcmalloc_dir)/src/windows/mini_disassembler.h',
284 '<(tcmalloc_dir)/src/windows/mini_disassembler_types.h',
285 '<(tcmalloc_dir)/src/windows/override_functions.cc',
286 '<(tcmalloc_dir)/src/windows/patch_functions.cc',
287 '<(tcmalloc_dir)/src/windows/preamble_patcher.cc',
288 '<(tcmalloc_dir)/src/windows/preamble_patcher.h',
289 '<(tcmalloc_dir)/src/windows/preamble_patcher_with_stub.cc',
292 '../third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
295 # TODO(sgk): merge this with build/common.gypi settings
297 'AdditionalOptions': ['/ignore:4006,4221'],
300 'AdditionalOptions': ['/ignore:4006'],
306 'VCCLCompilerTool': {
307 'RuntimeLibrary': '0',
311 # Provide a way to force disable debugallocation in Debug builds,
312 # e.g. for profiling (it's more rare to profile Debug builds,
313 # but people sometimes need to do that).
314 'disable_debugallocation%': 0,
317 # TODO(phajdan.jr): Also enable on Windows.
318 ['disable_debugallocation==0 and OS!="win"', {
320 # Use debugallocation for Debug builds to catch problems early
321 # and cleanly, http://crbug.com/30715 .
322 'TCMALLOC_FOR_DEBUGALLOCATION',
329 ['OS=="linux" and clang_type_profiler==1', {
331 'type_profiler_tcmalloc',
333 # It is undoing dependencies and cflags_cc for type_profiler which
334 # build/common.gypi injects into all targets.
339 '-fintercept-allocation-functions',
344 'PERFTOOLS_DLL_DECL=',
347 # tcmalloc source files unconditionally define this, remove it from
348 # the list of defines that common.gypi defines globally.
356 '<(tcmalloc_dir)/src/windows',
359 '<(tcmalloc_dir)/src/base/elf_mem_image.cc',
360 '<(tcmalloc_dir)/src/base/elf_mem_image.h',
361 '<(tcmalloc_dir)/src/base/linuxthreads.cc',
362 '<(tcmalloc_dir)/src/base/linuxthreads.h',
363 '<(tcmalloc_dir)/src/base/vdso_support.cc',
364 '<(tcmalloc_dir)/src/base/vdso_support.h',
365 '<(tcmalloc_dir)/src/maybe_threads.cc',
366 '<(tcmalloc_dir)/src/maybe_threads.h',
367 '<(tcmalloc_dir)/src/symbolize.h',
368 '<(tcmalloc_dir)/src/system-alloc.cc',
369 '<(tcmalloc_dir)/src/system-alloc.h',
371 # included by allocator_shim.cc
372 'debugallocation_shim.cc',
374 # heap-profiler/checker/cpuprofiler
375 '<(tcmalloc_dir)/src/base/thread_lister.c',
376 '<(tcmalloc_dir)/src/base/thread_lister.h',
377 '<(tcmalloc_dir)/src/deep-heap-profile.cc',
378 '<(tcmalloc_dir)/src/deep-heap-profile.h',
379 '<(tcmalloc_dir)/src/heap-checker-bcad.cc',
380 '<(tcmalloc_dir)/src/heap-checker.cc',
381 '<(tcmalloc_dir)/src/heap-profiler.cc',
382 '<(tcmalloc_dir)/src/heap-profile-table.cc',
383 '<(tcmalloc_dir)/src/heap-profile-table.h',
384 '<(tcmalloc_dir)/src/memory_region_map.cc',
385 '<(tcmalloc_dir)/src/memory_region_map.h',
386 '<(tcmalloc_dir)/src/profiledata.cc',
387 '<(tcmalloc_dir)/src/profiledata.h',
388 '<(tcmalloc_dir)/src/profile-handler.cc',
389 '<(tcmalloc_dir)/src/profile-handler.h',
390 '<(tcmalloc_dir)/src/profiler.cc',
393 ['OS=="linux" or OS=="freebsd" or OS=="solaris" or OS=="android"', {
395 '<(tcmalloc_dir)/src/system-alloc.h',
396 '<(tcmalloc_dir)/src/windows/port.cc',
397 '<(tcmalloc_dir)/src/windows/port.h',
399 # TODO(willchan): Support allocator shim later on.
402 # TODO(willchan): support jemalloc on other platforms
404 '<(jemalloc_dir)/jemalloc.c',
405 '<(jemalloc_dir)/jemalloc.h',
406 '<(jemalloc_dir)/ql.h',
407 '<(jemalloc_dir)/qr.h',
408 '<(jemalloc_dir)/rb.h',
411 # We enable all warnings by default, but upstream disables a few.
412 # Keep "-Wno-*" flags in sync with upstream by comparing against:
413 # http://code.google.com/p/google-perftools/source/browse/trunk/Makefile.am
416 '-Wno-unused-result',
419 '-fvisibility=hidden',
423 # Don't let linker rip this symbol out, otherwise the heap&cpu
424 # profilers will not initialize properly on startup.
425 '-Wl,-uIsHeapProfilerRunning,-uProfilerStart',
426 # Do the same for heap leak checker.
427 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
428 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
429 '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv',
432 # Need to distinguish a non-SDK build for Android WebView
433 # due to differences in C include files.
434 ['OS=="android" and android_webview_build==1', {
435 'defines': ['ANDROID_NON_SDK_BUILD'],
437 [ 'use_vtable_verify==1', {
439 '-fvtable-verify=preinit',
442 [ 'linux_keep_shadow_stacks==1', {
444 '<(tcmalloc_dir)/src/linux_shadow_stacks.cc',
445 '<(tcmalloc_dir)/src/linux_shadow_stacks.h',
446 '<(tcmalloc_dir)/src/stacktrace_shadow-inl.h',
449 '-finstrument-functions',
452 'KEEP_SHADOW_STACKS',
455 [ 'linux_use_heapchecker==0', {
456 # Do not compile and link the heapchecker source.
458 '<(tcmalloc_dir)/src/heap-checker-bcad.cc',
459 '<(tcmalloc_dir)/src/heap-checker.cc',
461 # Disable the heap checker in tcmalloc.
466 ['order_profiling != 0', {
467 'target_conditions' : [
468 ['_toolset=="target"', {
469 'cflags!': [ '-finstrument-functions' ],
476 # This library is linked in to src/base.gypi:base and allocator_unittests
477 # It can't depend on either and nothing else should depend on it - all
478 # other code should use the interfaced provided by base.
479 'target_name': 'allocator_extension_thunks',
480 'type': 'static_library',
482 'allocator_extension_thunks.cc',
483 'allocator_extension_thunks.h',
485 'toolsets': ['host', 'target'],
490 ['OS=="linux" and clang_type_profiler==1', {
491 # It is undoing dependencies and cflags_cc for type_profiler which
492 # build/common.gypi injects into all targets.
497 '-fintercept-allocation-functions',
507 'target_name': 'libcmt',
511 'action_name': 'libcmt',
516 '<(SHARED_INTERMEDIATE_DIR)/allocator/libcmt.lib',
521 '$(VCInstallDir)lib',
522 '<(SHARED_INTERMEDIATE_DIR)/allocator',
529 'target_name': 'allocator_unittests',
530 'type': 'executable',
533 'allocator_extension_thunks',
534 '../../testing/gtest.gyp:gtest',
538 '<(tcmalloc_dir)/src/base',
539 '<(tcmalloc_dir)/src',
543 'allocator_unittests.cc',
544 '../profiler/alternate_timer.cc',
545 '../profiler/alternate_timer.h',
549 'target_name': 'tcmalloc_unittest',
550 'type': 'executable',
552 'tcmalloc_unittest.cc',
556 # For constants of TCMalloc.
557 '<(tcmalloc_dir)/src',
560 '../../testing/gtest.gyp:gtest',
567 ['OS=="win" and target_arch=="ia32"', {
570 'target_name': 'allocator_extension_thunks_win64',
571 'type': 'static_library',
573 'allocator_extension_thunks.cc',
574 'allocator_extension_thunks.h',
576 'toolsets': ['host', 'target'],
582 'msvs_target_platform': 'x64',
588 ['OS=="linux" and clang_type_profiler==1', {
589 # Some targets in this section undo dependencies and cflags_cc for
590 # type_profiler which build/common.gypi injects into all targets.
593 'target_name': 'type_profiler',
594 'type': 'static_library',
599 '-fintercept-allocation-functions',
607 'type_profiler_control.h',
609 'toolsets': ['host', 'target'],
612 'target_name': 'type_profiler_tcmalloc',
613 'type': 'static_library',
618 '-fintercept-allocation-functions',
621 '<(tcmalloc_dir)/src',
625 'type_profiler_tcmalloc.cc',
626 'type_profiler_tcmalloc.h',
627 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
628 '<(tcmalloc_dir)/src/type_profiler_map.cc',
632 'target_name': 'type_profiler_unittests',
633 'type': 'executable',
635 '../../testing/gtest.gyp:gtest',
638 'type_profiler_tcmalloc',
644 'type_profiler_control.cc',
645 'type_profiler_control.h',
646 'type_profiler_unittests.cc',
650 'target_name': 'type_profiler_map_unittests',
651 'type': 'executable',
653 '../../testing/gtest.gyp:gtest',
661 '-fintercept-allocation-functions',
664 '<(tcmalloc_dir)/src',
668 'type_profiler_map_unittests.cc',
669 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
670 '<(tcmalloc_dir)/src/type_profiler_map.cc',