diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 12:52:33 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 12:52:33 +0000 |
commit | b67b319e52583456f201b2be86bd64373555d6a3 (patch) | |
tree | 988fc09c32568fb66b347d48918abe86ebe72438 /components | |
parent | 661ebb3851bc31c8b671ced12942cb9d367a3a99 (diff) | |
download | chromium_src-b67b319e52583456f201b2be86bd64373555d6a3.zip chromium_src-b67b319e52583456f201b2be86bd64373555d6a3.tar.gz chromium_src-b67b319e52583456f201b2be86bd64373555d6a3.tar.bz2 |
Set the default ASan options for executables built with ASan on Linux.
This is a copy of https://codereview.chromium.org/25687005/ updated for the current trunk
with the link_dependency attribute speculatively added to base/base.gyp:sanitizer_options
to avoid potential dependency cycles.
This CL introduces a module, base/debug/sanitizer_options.cc, which will override
the defaults for various dynamic tools (only ASan at this moment). For every executable
built with a dynamic tool this module will be linked into that executable, providing
weak functions to be called by the tool.
The existing declaration of __asan_default_options() in chrome/app/chrome_exe_main_gtk.cc
has been moved into sanitizer_options.cc (now every binary built with GOOGLE_CHROME_BUILD=1
will have the same options as google-chrome-asan.
The existing declaration of __asan_default_options() in chrome/nacl/nacl_helper_linux.cc
has been kept as is, but we had to remove -Wl,-u_sanitizer_options_link_helper to avoid picking sanitizer_options.cc.
GYP changes for OSX and iOS will be committed separately.
BUG=302040
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/201153007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259561 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r-- | components/nacl.gyp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/nacl.gyp b/components/nacl.gyp index 3194b0a..8b2ddc2 100644 --- a/components/nacl.gyp +++ b/components/nacl.gyp @@ -189,6 +189,12 @@ '../sandbox/sandbox.gyp:sandbox', '../ppapi/ppapi_internal.gyp:ppapi_proxy', ], + 'ldflags!': [ + # Do not pick the default ASan options from + # base/debug/sanitizer_options.cc to avoid th conflict with + # those in nacl/nacl_helper_linux.cc. + '-Wl,-u_sanitizer_options_link_helper', + ], 'defines': [ '<@(nacl_defines)', # Allow .cc files to know if they're being compiled as part |