[sanitizers] Propagate the sanitizer options through to the lit context.
authorChandler Carruth <chandlerc@gmail.com>
Fri, 2 May 2014 21:47:35 +0000 (21:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 2 May 2014 21:47:35 +0000 (21:47 +0000)
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

test/lit.cfg

index f29ae85a09fe0de866110e8e57499e26bee12d3c..9eaeb1f414155e903659e133f02e29ea8aa4832f 100644 (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