Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: build/common.gypi

Issue 10411047: Type profiler by intercepting 'new' and 'delete' expressions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Support operator delete[]. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/new_delete_type_tcmalloc.cc ('k') | third_party/tcmalloc/chromium/src/allocated_type_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 68cadbbdbe48eea8fa2c13e9d3c756f6ac1a1a0b..1276560e266312c9516d5470e02690e2d1d82e62 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -218,6 +218,8 @@
# Has no effect if 'clang' is not set as well.
'clang_use_chrome_plugins%': 1,
+ 'clang_allocated_type%': 0,
+
# Enable building with ASAN (Clang's -faddress-sanitizer option).
# -faddress-sanitizer only works with clang, but asan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
@@ -1520,6 +1522,28 @@
}],
], # conditions for 'target_defaults'
'target_conditions': [
+ ['_type=="executable" or _type=="loadable_module"', {
+ 'target_conditions': [
+ ['_target_name=="mksnapshot" or _target_name=="protoc" or _target_name=="ppGoogleNaClPluginChrome"', {
+ # Ignore allocated types.
+ 'conditions': [
+ ['clang==1 and clang_allocated_type==1', {
+ 'dependencies': [
+ 'base/allocator/allocator.gyp:new_delete_type_ignore#target',
+ ]},
+ ],
+ ]}, {
+ # Store allocated types in TCMalloc's allocated_type_map (extended).
+ 'conditions': [
+ ['clang==1 and clang_allocated_type==1', {
+ 'dependencies': [
+ 'base/allocator/allocator.gyp:new_delete_type_tcmalloc#target',
+ ]},
+ ],
+ ]},
+ ]
+ ]},
+ ],
['enable_wexit_time_destructors==1', {
'conditions': [
[ 'clang==1', {
@@ -2212,6 +2236,10 @@
# Warns on switches on enums that cover all enum values but
# also contain a default: branch. Chrome is full of that.
'-Wno-covered-switch-default',
+
+ '-Wno-sometimes-uninitialized',
+ '-Wno-unused-value',
+ '-Wno-unused-private-field',
],
'cflags!': [
# Clang doesn't seem to know know this flag.
@@ -2239,6 +2267,17 @@
'-fcolor-diagnostics',
],
}],
+ ['clang==1 and clang_allocated_type==1', {
+ 'cflags_cc!': ['-fno-rtti'],
+ 'cflags_cc+': [
+ '-frtti',
+ '-fallocated-type-in-operator-new',
+ '-I../../base/allocator',
+ '-include',
+ 'new_delete_type.h',
+ ],
+ 'defines': ['USE_NEW_DELETE_TYPE'],
+ }],
['asan==1', {
'target_conditions': [
['_toolset=="target"', {
@@ -2651,6 +2690,9 @@
# Warns on switches on enums that cover all enum values but
# also contain a default: branch. Chrome is full of that.
'-Wno-covered-switch-default',
+
Dai Mikurube (NOT FULLTIME) 2012/06/15 19:54:34 Add -Wno-unused-private-field here.
+ '-Wno-sometimes-uninitialized',
+ '-Wno-unused-value',
],
}],
['clang==1 and clang_use_chrome_plugins==1', {
« no previous file with comments | « base/allocator/new_delete_type_tcmalloc.cc ('k') | third_party/tcmalloc/chromium/src/allocated_type_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698