Index: base/allocator/allocator.gyp |
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp |
index b85dd516dca2e20ba71e584b15e3b12272bc15c5..811cf81a0801b0abd61e53af7dae801a2c1419e0 100644 |
--- a/base/allocator/allocator.gyp |
+++ b/base/allocator/allocator.gyp |
@@ -303,6 +303,18 @@ |
}, |
}, |
'conditions': [ |
+ ['OS=="linux" and clang_type_profiler==1', { |
+ 'dependencies': [ |
+ 'type_profiler_tcmalloc', |
+ ], |
+ 'dependencies!': [ |
+ 'type_profiler', |
+ ], |
+ 'cflags_cc!': [ |
+ '-fintercept-allocation-functions', |
+ '-include ../../base/allocator/type_profiler.h', |
+ ], |
+ }], |
['OS=="win"', { |
'defines': [ |
'PERFTOOLS_DLL_DECL=', |
@@ -459,6 +471,17 @@ |
'include_dirs': [ |
'../../' |
], |
+ 'conditions': [ |
+ ['OS=="linux" and clang_type_profiler==1', { |
+ 'dependencies!': [ |
+ 'type_profiler', |
+ ], |
+ 'cflags_cc!': [ |
+ '-fintercept-allocation-functions', |
+ '-include ../../base/allocator/type_profiler.h', |
+ ], |
+ }], |
+ ], |
}, |
], |
'conditions': [ |
@@ -541,5 +564,102 @@ |
}, |
], |
}], |
+ ['OS=="linux" and clang_type_profiler==1', { |
+ 'targets': [ |
+ { |
+ 'target_name': 'type_profiler', |
+ 'type': 'static_library', |
+ 'dependencies!': [ |
+ 'type_profiler', |
+ ], |
+ 'cflags_cc!': [ |
+ '-fintercept-allocation-functions', |
+ '-include ../../base/allocator/type_profiler.h', |
+ ], |
+ 'include_dirs': [ |
+ '.', |
+ '<(tcmalloc_dir)/src/base', |
+ '<(tcmalloc_dir)/src', |
+ '../..', |
+ ], |
+ 'sources': [ |
+ 'type_profiler.cc', |
+ 'type_profiler.h', |
+ 'type_profiler_control.h', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'type_profiler_tcmalloc', |
+ 'type': 'static_library', |
+ 'dependencies!': [ |
+ 'type_profiler', |
+ ], |
+ 'cflags_cc!': [ |
+ '-fintercept-allocation-functions', |
+ '-include ../../base/allocator/type_profiler.h', |
+ ], |
+ 'include_dirs': [ |
+ '.', |
+ '<(tcmalloc_dir)/src/base', |
+ '<(tcmalloc_dir)/src', |
+ '../..', |
+ ], |
+ 'sources': [ |
+ 'type_profiler_tcmalloc.cc', |
+ 'type_profiler_tcmalloc.h', |
+ '<(tcmalloc_dir)/src/type_profiler_map.cc', |
+ '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'type_profiler_unittests', |
+ 'type': 'executable', |
+ 'dependencies': [ |
+ '../../testing/gtest.gyp:gtest', |
+ '../base.gyp:base', |
+ 'allocator', |
+ 'type_profiler_tcmalloc', |
+ ], |
+ 'include_dirs': [ |
+ '.', |
+ '<(tcmalloc_dir)/src/base', |
+ '<(tcmalloc_dir)/src', |
+ '../..', |
+ ], |
+ 'sources': [ |
+ 'type_profiler_control.cc', |
+ 'type_profiler_control.h', |
+ 'type_profiler_unittests.cc', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'type_profiler_map_unittests', |
+ 'type': 'executable', |
+ 'dependencies': [ |
+ '../../testing/gtest.gyp:gtest', |
+ '../base.gyp:base', |
+ 'allocator', |
+ ], |
+ 'dependencies!': [ |
+ 'type_profiler', |
+ ], |
+ 'cflags_cc!': [ |
+ '-fintercept-allocation-functions', |
+ '-include ../../base/allocator/type_profiler.h', |
+ ], |
+ 'include_dirs': [ |
+ '.', |
+ '<(tcmalloc_dir)/src/base', |
+ '<(tcmalloc_dir)/src', |
+ '../..', |
+ ], |
+ 'sources': [ |
+ 'type_profiler_map_unittests.cc', |
+ '<(tcmalloc_dir)/src/type_profiler_map.cc', |
+ '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h', |
+ ], |
+ }, |
+ ], |
+ }], |
], |
} |