Set the default ASan options for executables built with ASan on Linux.
commitfa20529f73465f47839de9ba39c7b0436c689192
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 11 Nov 2013 09:42:02 +0000 (11 09:42 +0000)
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 11 Nov 2013 09:42:02 +0000 (11 09:42 +0000)
treecf96cb2165aa548151b8a801eb41e98feba1ce02
parent9ce723d4ab1676d05ef2ba4c18ff3df27b9b5976
Set the default ASan options for executables built with ASan on Linux.

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
R=thakis@chromium.org

Review URL: https://codereview.chromium.org/25687005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234207 0039d316-1c4b-4281-b951-d872f2087c98
base/base.gyp
base/debug/sanitizer_options.cc [new file with mode: 0644]
build/common.gypi
chrome/app/chrome_exe_main_gtk.cc
chrome/nacl.gypi