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', { |