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