Skip to content

Commit 5fbf769

Browse files
committed
[asan] On Linux, when running with ASAN, disable leaks detection.
The reason to do this is that: 1. We already have a separate leaks bot. 2. We are not leaks clean at -O, but are ASAN clean at -O. It doesn't make sense to limit our ability to verify that on Linux, we stay ASAN clean at -O since we are not leaks clean at -O. Once we get leaks clean at -O, we should create a separate bot. rdar://31276806
1 parent 817c549 commit 5fbf769

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utils/build-script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,11 @@ class BuildScriptInvocation(object):
546546
# NOT pass them to build-script-impl.
547547
if args.enable_asan:
548548
impl_args += ["--enable-asan"]
549+
# If we are on linux, disable leak detection when running ASAN. We
550+
# have a separate bot that checks for leaks.
551+
if platform.system() == 'Linux':
552+
os.environ['ASAN_OPTIONS'] = 'detect_leaks=0'
553+
549554
# If we have lsan, we need to export our suppression list. The actual
550555
# passing in of the LSAN flag is done via the normal cmake method. We
551556
# do not pass the flag to build-script-impl.

0 commit comments

Comments
 (0)