Commit 6a4cad03 authored by glider@chromium.org's avatar glider@chromium.org

If asan==1:

 -- pass the -faddress-sanitizer flag to enable ASan;
 -- pass the -fasan flag for backward compatibility;
 -- pass the -DADDRESS_SANITIZER which soon won't be defined by ASan;
 -- mark several functions missing in the 10.5 SDK as dynamic_lookup

 Whitespace fix.

TBR=thakis
Review URL: http://codereview.chromium.org/8676002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111575 0039d316-1c4b-4281-b951-d872f2087c98
parent b3aa6a4a
......@@ -1923,17 +1923,17 @@
['asan==1', {
# Only in the linux section for now, since ASAN doesn't
# work on Mac yet.
# TODO(glider): -fasan is deprecated. Remove it when we stop using
# it.
# TODO(glider): -fasan is deprecated. Remove it when we stop using
# it.
'cflags': [
'-fasan',
'-faddress-sanitizer',
'-faddress-sanitizer',
'-w',
'-DADDRESS_SANITIZER',
'-DADDRESS_SANITIZER',
],
'ldflags': [
'-fasan',
'-faddress-sanitizer',
'-faddress-sanitizer',
],
}],
['no_strict_aliasing==1', {
......@@ -2327,8 +2327,33 @@
'asan_saves_file': 'asan.saves',
},
'xcode_settings': {
'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
'OTHER_CFLAGS': [
'-fasan',
'-faddress-sanitizer',
'-w',
],
'OTHER_LDFLAGS': [
'-fasan',
'-faddress-sanitizer',
# The symbols below are referenced in the ASan runtime
# library (compiled on OS X 10.6), but may be unavailable
# on the prior OS X versions. Because Chromium is currently
# targeting 10.5.0, we need to explicitly mark these
# symbols as dynamic_lookup.
'-Wl,-U,_malloc_default_purgeable_zone',
'-Wl,-U,_malloc_zone_memalign',
'-Wl,-U,_dispatch_sync_f',
'-Wl,-U,_dispatch_async_f',
'-Wl,-U,_dispatch_barrier_async_f',
'-Wl,-U,_dispatch_group_async_f',
'-Wl,-U,_dispatch_after_f',
],
},
'defines': [
'ADDRESS_SANITIZER',
],
}],
],
'target_conditions': [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment