Commit 7831d657 authored by cmtice@chromium.org's avatar cmtice@chromium.org

Support vtable_verify (new compiler option).

I'm in the process of adding a new option to the gcc compiler in ChromeOS, that does vtable pointer verification before virtual method calls.  The new compiler flag is "-fvtable-verify=std" or "-fvtable-verify=preinit".  I'm modifying the Chrome ebuild flag in Chrome OS to allow "USE=vtable_verify" and which causes 'use_vtable_verify' to be defined and set to 1. 

In this CL I have modified common.gypi to add the compiler flag '-fvtable-verify=std' if it sees use_vtable_verify set to 1; and I have modified allocator.gyp to change '-fvtable-verify=std' into '-fvtable-verify=preinit' (tcmalloc stuff requires this special flag).


BUG=
TEST=Built Chrome with GYP_DEFINES=use_vtable_verify=1


Review URL: https://chromiumcodereview.appspot.com/10854031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152003 0039d316-1c4b-4281-b951-d872f2087c98
parent 33dd256e
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
'variables': { 'variables': {
'jemalloc_dir': '../../third_party/jemalloc/chromium', 'jemalloc_dir': '../../third_party/jemalloc/chromium',
'tcmalloc_dir': '../../third_party/tcmalloc/chromium', 'tcmalloc_dir': '../../third_party/tcmalloc/chromium',
'use_vtable_verify%': 0,
}, },
'targets': [ 'targets': [
{ {
...@@ -394,6 +395,11 @@ ...@@ -394,6 +395,11 @@
'-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv', '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv',
]}, ]},
}], }],
[ 'use_vtable_verify==1', {
'cflags': [
'-fvtable-verify=preinit',
],
}],
[ 'linux_use_debugallocation==1', { [ 'linux_use_debugallocation==1', {
'sources!': [ 'sources!': [
# debugallocation.cc #includes tcmalloc.cc, # debugallocation.cc #includes tcmalloc.cc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment