diff options
author | cmtice@chromium.org <cmtice@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-17 00:18:21 +0000 |
---|---|---|
committer | cmtice@chromium.org <cmtice@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-17 00:18:21 +0000 |
commit | 7831d657839f81c88af9f7a7257870b2e7ce0e0d (patch) | |
tree | ffbf95f849eb23ef632ef5dc6b6663dcc4bed63d /base/allocator | |
parent | 33dd256e30814a130beab0d4c7e21bb8d2861688 (diff) | |
download | chromium_src-7831d657839f81c88af9f7a7257870b2e7ce0e0d.zip chromium_src-7831d657839f81c88af9f7a7257870b2e7ce0e0d.tar.gz chromium_src-7831d657839f81c88af9f7a7257870b2e7ce0e0d.tar.bz2 |
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
Diffstat (limited to 'base/allocator')
-rw-r--r-- | base/allocator/allocator.gyp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp index e2c8ac0..f2a6160 100644 --- a/base/allocator/allocator.gyp +++ b/base/allocator/allocator.gyp @@ -6,6 +6,7 @@ 'variables': { 'jemalloc_dir': '../../third_party/jemalloc/chromium', 'tcmalloc_dir': '../../third_party/tcmalloc/chromium', + 'use_vtable_verify%': 0, }, 'targets': [ { @@ -394,6 +395,11 @@ '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv', ]}, }], + [ 'use_vtable_verify==1', { + 'cflags': [ + '-fvtable-verify=preinit', + ], + }], [ 'linux_use_debugallocation==1', { 'sources!': [ # debugallocation.cc #includes tcmalloc.cc, |