Skip to content

Commit c7b30d8

Browse files
committed
[sanitizers] Propagate the sanitizer options through to the lit context.
This makes it *really* easy to debug leaks FYI: ASAN_OPTIONS=detect_leaks=1 ./bin/llvm-lit -v <path to test> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207874 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 71aafce commit c7b30d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
9595
if symbolizer in os.environ:
9696
config.environment[symbolizer] = os.environ[symbolizer]
9797

98+
# Propagate options for sanitizers.
99+
for options in ['ASAN_OPTIONS']:
100+
if options in os.environ:
101+
config.environment[options] = os.environ[options]
102+
98103
###
99104

100105
import os

0 commit comments

Comments
 (0)