r207873 - [sanitizers] Propagate the sanitizer options through to the lit context.

Chandler Carruth chandlerc at gmail.com
Fri May 2 14:46:40 PDT 2014


Author: chandlerc
Date: Fri May  2 16:46:39 2014
New Revision: 207873

URL: http://llvm.org/viewvc/llvm-project?rev=207873&view=rev
Log:
[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>

Modified:
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=207873&r1=207872&r2=207873&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Fri May  2 16:46:39 2014
@@ -115,6 +115,11 @@ for symbolizer in ['ASAN_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.





More information about the cfe-commits mailing list