Commit 66000edf authored by tzik@chromium.org's avatar tzik@chromium.org

Enable warning on ASan-enabled build

Enables most of compiler warning on ASan build.

BUG=162783

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283535 0039d316-1c4b-4281-b951-d872f2087c98
parent 8e93b1ef
...@@ -3980,7 +3980,7 @@ ...@@ -3980,7 +3980,7 @@
['_toolset=="target"', { ['_toolset=="target"', {
'cflags': [ 'cflags': [
'-fsanitize=address', '-fsanitize=address',
'-w', # http://crbug.com/162783 '-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags': [ 'ldflags': [
'-fsanitize=address', '-fsanitize=address',
...@@ -3991,6 +3991,7 @@ ...@@ -3991,6 +3991,7 @@
['OS=="mac"', { ['OS=="mac"', {
'cflags': [ 'cflags': [
'-mllvm -asan-globals=0', # http://crbug.com/352073 '-mllvm -asan-globals=0', # http://crbug.com/352073
'-Wno-error=unused-function', # http://crbug.com/162783
], ],
}], }],
], ],
...@@ -4002,7 +4003,7 @@ ...@@ -4002,7 +4003,7 @@
'-fsanitize=undefined', '-fsanitize=undefined',
# -fsanitize=vptr is incompatible with -fno-rtti. # -fsanitize=vptr is incompatible with -fno-rtti.
'-fno-sanitize=vptr', '-fno-sanitize=vptr',
'-w', # http://crbug.com/162783 '-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags': [ 'ldflags': [
'-fsanitize=undefined', '-fsanitize=undefined',
...@@ -4011,6 +4012,13 @@ ...@@ -4011,6 +4012,13 @@
], ],
}], }],
], ],
'conditions': [
['OS=="mac"', {
'cflags': [
'-Wno-error=unused-function', # http://crbug.com/162783
],
}],
],
}], }],
['ubsan_vptr==1', { ['ubsan_vptr==1', {
'target_conditions': [ 'target_conditions': [
...@@ -4019,7 +4027,7 @@ ...@@ -4019,7 +4027,7 @@
'-fsanitize=vptr', '-fsanitize=vptr',
'-fsanitize=null', # Avoid dereferences on null pointer objects. '-fsanitize=null', # Avoid dereferences on null pointer objects.
'-fsanitize-blacklist=<(ubsan_vptr_blacklist)', '-fsanitize-blacklist=<(ubsan_vptr_blacklist)',
'-w', # http://crbug.com/162783 '-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'cflags_cc!': [ 'cflags_cc!': [
'-fno-rtti', '-fno-rtti',
...@@ -4035,6 +4043,13 @@ ...@@ -4035,6 +4043,13 @@
], ],
}], }],
], ],
'conditions': [
['OS=="mac"', {
'cflags': [
'-Wno-error=unused-function', # http://crbug.com/162783
],
}],
],
}], }],
['asan_coverage!=0', { ['asan_coverage!=0', {
'target_conditions': [ 'target_conditions': [
...@@ -4608,7 +4623,8 @@ ...@@ -4608,7 +4623,8 @@
# binaries on x86_64 host is problematic. # binaries on x86_64 host is problematic.
# TODO(eugenis): re-enable. # TODO(eugenis): re-enable.
'-fsanitize=address', '-fsanitize=address',
'-w', # http://crbug.com/162783 '-Wno-error=macro-redefined', # http://crbug.com/162783
], ],
'ldflags!': [ 'ldflags!': [
'-fsanitize=address', '-fsanitize=address',
...@@ -4619,6 +4635,13 @@ ...@@ -4619,6 +4635,13 @@
'-Wl,--warn-shared-textrel', '-Wl,--warn-shared-textrel',
'-Wl,--fatal-warnings', '-Wl,--fatal-warnings',
], ],
'conditions': [
['OS=="mac"', {
'cflags!': [
'-Wno-error=unused-function', # http://crbug.com/162783
],
}],
],
}], }],
# Settings for building host targets on mac. # Settings for building host targets on mac.
['_toolset=="host" and host_os=="mac"', { ['_toolset=="host" and host_os=="mac"', {
...@@ -4771,7 +4794,8 @@ ...@@ -4771,7 +4794,8 @@
'OTHER_CFLAGS': [ 'OTHER_CFLAGS': [
'-fsanitize=address', '-fsanitize=address',
'-mllvm -asan-globals=0', # http://crbug.com/352073 '-mllvm -asan-globals=0', # http://crbug.com/352073
'-w', # http://crbug.com/162783 '-Wno-error=macro-redefined', # http://crbug.com/162783
'-Wno-error=unused-function', # http://crbug.com/162783
'-gline-tables-only', '-gline-tables-only',
], ],
}, },
......
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