summaryrefslogtreecommitdiffstats
path: root/components/nacl.gyp
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 13:56:35 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 13:56:35 +0000
commit10acc3e5f140da083b3b302feba7cfd041f694a4 (patch)
tree40352024abc84d18dd08a39aaea4dc250d8616a7 /components/nacl.gyp
parent9040b8a52f88f7e54d787da5db320641b96166df (diff)
downloadchromium_src-10acc3e5f140da083b3b302feba7cfd041f694a4.zip
chromium_src-10acc3e5f140da083b3b302feba7cfd041f694a4.tar.gz
chromium_src-10acc3e5f140da083b3b302feba7cfd041f694a4.tar.bz2
Set the default ASan options for executables built with ASan on Linux.
This is a copy of https://codereview.chromium.org/201153007 and https://codereview.chromium.org/213113002 updated to the current trunk with more descriptive comments in sanitizer_options.cc and the additional legacy_pthread_cond=1 option for the Linux builds. 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. The default options target is deliberately disabled on 32-bit Chromium OS builds, where one of the host binaries (mksnapshot.ia32) is 32-bit despite host_arch==x86_64. GYP changes for OSX and iOS will be committed separately. BUG=302040,341805 TBR=thakis@chromium.org,mseaborn@chromium.org Review URL: https://codereview.chromium.org/230263003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/nacl.gyp')
-rw-r--r--components/nacl.gyp6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/nacl.gyp b/components/nacl.gyp
index 028b8c6..99d89f0 100644
--- a/components/nacl.gyp
+++ b/components/nacl.gyp
@@ -190,6 +190,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 a 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