[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
This commit is contained in:
Chandler Carruth 2014-05-02 21:47:35 +00:00
parent 71aafce117
commit c7b30d80a2

View File

@ -95,6 +95,11 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
if symbolizer in os.environ:
config.environment[symbolizer] = os.environ[symbolizer]
# Propagate options for sanitizers.
for options in ['ASAN_OPTIONS']:
if options in os.environ:
config.environment[options] = os.environ[options]
###
import os