Add ASAN option to stand-alone gyp config.
authormachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Mar 2014 10:36:55 +0000 (10:36 +0000)
committermachenbach@chromium.org <machenbach@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Mar 2014 10:36:55 +0000 (10:36 +0000)
BUG=
R=jkummerow@chromium.org, jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

build/standalone.gypi

index cae63fe..79c563f 100644 (file)
@@ -34,6 +34,7 @@
   'variables': {
     'component%': 'static_library',
     'clang%': 0,
+    'asan%': 0,
     'visibility%': 'hidden',
     'v8_enable_backtrace%': 0,
     'v8_enable_i18n_support%': 1,
     ],
   },
   'conditions': [
+    ['asan==1', {
+      'target_defaults': {
+        'cflags_cc+': [
+          '-fno-omit-frame-pointer',
+          '-gline-tables-only',
+          '-fsanitize=address',
+          '-w',  # http://crbug.com/162783
+        ],
+        'cflags_cc!': [
+          '-fomit-frame-pointer',
+        ],
+        'ldflags': [
+          '-fsanitize=address',
+        ],
+      }
+    }],
     ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
        or OS=="netbsd"', {
       'target_defaults': {