Commit 1612e555 authored by hans@chromium.org's avatar hans@chromium.org

Make SyzyAsan depend on 'syzyasan' GYP flag instead of 'asan==1 and OS=="win"'

We're bringing the regular Clang-based ASan to Windows and will put it behind
asan==1 like on all other platforms.

BUG=343960

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251518 0039d316-1c4b-4281-b951-d872f2087c98
parent 4e6abdf0
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
'../remoting/remoting.gyp:remoting_host_installation', '../remoting/remoting.gyp:remoting_host_installation',
], ],
}], }],
['asan==1', { ['syzyasan==1', {
'variables': { 'variables': {
# Disable incremental linking for all modules. # Disable incremental linking for all modules.
# 0: inherit, 1: disabled, 2: enabled. # 0: inherit, 1: disabled, 2: enabled.
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
], ],
'msvs_settings': { 'msvs_settings': {
'VCLinkerTool': { 'VCLinkerTool': {
# Enable profile information (necessary for asan # Enable profile information (necessary for SyzyAsan
# instrumentation). This is incompatible with incremental # instrumentation). This is incompatible with incremental
# linking. # linking.
'Profile': 'true', 'Profile': 'true',
......
...@@ -351,6 +351,10 @@ ...@@ -351,6 +351,10 @@
# controls coverage granularity (experimental). # controls coverage granularity (experimental).
'asan_coverage%': 0, 'asan_coverage%': 0,
# Enable building with SyzyAsan.
# See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
'syzyasan%': 0,
# Enable building with LSan (Clang's -fsanitize=leak option). # Enable building with LSan (Clang's -fsanitize=leak option).
# -fsanitize=leak only works with clang, but lsan=1 implies clang=1 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
...@@ -931,6 +935,7 @@ ...@@ -931,6 +935,7 @@
'mac_want_real_dsym%': '<(mac_want_real_dsym)', 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
'asan%': '<(asan)', 'asan%': '<(asan)',
'asan_coverage%': '<(asan_coverage)', 'asan_coverage%': '<(asan_coverage)',
'syzyasan%': '<(syzyasan)',
'lsan%': '<(lsan)', 'lsan%': '<(lsan)',
'msan%': '<(msan)', 'msan%': '<(msan)',
'msan_blacklist%': '<(msan_blacklist)', 'msan_blacklist%': '<(msan_blacklist)',
...@@ -1808,7 +1813,12 @@ ...@@ -1808,7 +1813,12 @@
], ],
}], }],
['asan==1 and OS=="win"', {
# TODO(hans): Remove once users set syzyasan (crbug.com/343960).
'syzyasan%': 1,
}],
['asan==1 and OS!="win"', { ['asan==1 and OS!="win"', {
# TODO(hans): Windows should use Clang-based ASan (crbug.com/343960).
'clang%': 1, 'clang%': 1,
}], }],
['asan==1 and OS=="mac"', { ['asan==1 and OS=="mac"', {
...@@ -2355,9 +2365,8 @@ ...@@ -2355,9 +2365,8 @@
'ENABLE_EGLIMAGE=1', 'ENABLE_EGLIMAGE=1',
], ],
}], }],
['asan==1 and OS=="win"', { ['syzyasan==1', {
# Since asan on windows uses Syzygy, we need /PROFILE turned on to # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
# produce appropriate pdbs.
'msvs_settings': { 'msvs_settings': {
'VCLinkerTool': { 'VCLinkerTool': {
'Profile': 'true', 'Profile': 'true',
...@@ -2367,7 +2376,7 @@ ...@@ -2367,7 +2376,7 @@
'ADDRESS_SANITIZER', 'ADDRESS_SANITIZER',
'MEMORY_TOOL_REPLACES_ALLOCATOR', 'MEMORY_TOOL_REPLACES_ALLOCATOR',
], ],
}], # asan==1 and OS=="win" }],
['OS=="win"', { ['OS=="win"', {
'defines': [ 'defines': [
'__STD_C', '__STD_C',
...@@ -4829,7 +4838,7 @@ ...@@ -4829,7 +4838,7 @@
'/nxcompat', '/nxcompat',
], ],
'conditions': [ 'conditions': [
['asan==0', { ['syzyasan==0', {
'AdditionalOptions': ['/largeaddressaware'], 'AdditionalOptions': ['/largeaddressaware'],
}], }],
], ],
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'conditions': [ 'conditions': [
['OS=="win" and asan==1', { ['syzyasan==1', {
'variables': { 'variables': {
'dest_dir': '<(PRODUCT_DIR)/syzygy', 'dest_dir': '<(PRODUCT_DIR)/syzygy',
'syzygy_exe_dir': '<(DEPTH)/third_party/syzygy/binaries/exe', 'syzygy_exe_dir': '<(DEPTH)/third_party/syzygy/binaries/exe',
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
}], }],
# Note, not else. # Note, not else.
['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and ' ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and '
'(asan!=1 or buildtype!="Official")', { '(syzyasan!=1 or buildtype!="Official")', {
'variables': { 'variables': {
'dll_name': 'chrome_child', 'dll_name': 'chrome_child',
}, },
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
}, { }, {
'conditions': [ 'conditions': [
['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and ' ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and '
'asan==1 and buildtype=="Official"', { 'syzyasan==1 and buildtype=="Official"', {
'targets': [ 'targets': [
{ {
'target_name': 'chrome_child_dll_syzygy', 'target_name': 'chrome_child_dll_syzygy',
......
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