diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-16 19:22:34 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-16 22:39:38 +0200 |
commit | ff7c68c4da47bf209a7b92d3c3b40da48a6b9630 (patch) | |
tree | 576f0892e14ce4cb6889a335765adb844ef78a55 | |
parent | edaf7af30bddef699ea68726fedd7a28d1dc999a (diff) | |
download | node-new-ff7c68c4da47bf209a7b92d3c3b40da48a6b9630.tar.gz |
build: add asan option to multi-arch/mode build
Make it possible to build node against Address Sanitizer. Enable with:
$ make -f Makefile.build asan=clang++ CC=clang CC_host=clang
PR-URL: https://github.com/node-forward/node/pull/24
Reviewed-By: Fedor Indutny <fedor@indutny.com>
-rw-r--r-- | common.gypi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common.gypi b/common.gypi index 0fa2d1856f..9c777ae08b 100644 --- a/common.gypi +++ b/common.gypi @@ -1,5 +1,6 @@ { 'variables': { + 'asan%': 0, 'werror': '', # Turn off -Werror in V8 build. 'visibility%': 'hidden', # V8's visibility setting 'target_arch%': 'ia32', # set v8's target architecture @@ -159,6 +160,16 @@ }, 'msvs_disabled_warnings': [4351, 4355, 4800], 'conditions': [ + ['asan != 0', { + 'cflags+': [ + '-fno-omit-frame-pointer', + '-fsanitize=address', + '-w', # http://crbug.com/162783 + ], + 'cflags_cc+': [ '-gline-tables-only' ], + 'cflags!': [ '-fomit-frame-pointer' ], + 'ldflags': [ '-fsanitize=address' ], + }], ['OS == "win"', { 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin 'defines': [ |