]> granicus.if.org Git - clang/commitdiff
[sanitizers] Propagate the sanitizer options through to the lit context.
authorChandler Carruth <chandlerc@gmail.com>
Fri, 2 May 2014 21:46:39 +0000 (21:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 2 May 2014 21:46:39 +0000 (21:46 +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/cfe/trunk@207873 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index 954e550d60dd23b3f0746019becc3adf405ab333..7dd5f6591f9f181a246ad7bb9487e8ab4f0de6db 100644 (file)
@@ -115,6 +115,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]
+
 ###
 
 # Check that the object root is known.