[libcxx-commits] [PATCH] D123843: [lit][libcxx] Forward sanitizer environment

Vitaly Buka via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 15 00:51:38 PDT 2022


vitalybuka created this revision.
Herald added a subscriber: arichardson.
Herald added a project: All.
vitalybuka requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123843

Files:
  libcxx/utils/run.py


Index: libcxx/utils/run.py
===================================================================
--- libcxx/utils/run.py
+++ libcxx/utils/run.py
@@ -53,6 +53,23 @@
         if 'TEMP' in os.environ:
             env['TEMP'] = os.environ.get('TEMP')
 
+    pass_vars = [
+        'ASAN_SYMBOLIZER_PATH',
+        'LSAN_SYMBOLIZER_PATH',
+        'MSAN_SYMBOLIZER_PATH',
+        'TSAN_SYMBOLIZER_PATH',
+        'UBSAN_SYMBOLIZER_PATH',
+        'ASAN_OPTIONS',
+        'LSAN_OPTIONS',
+        'MSAN_OPTIONS',
+        'TSAN_OPTIONS',
+        'UBSAN_OPTIONS',
+    ]
+    for var in pass_vars:
+        val = os.environ.get(var, '')
+        if val:
+            env[var] = val
+
     # Run the command line with the given environment in the execution directory.
     return subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123843.423033.patch
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220415/f1085503/attachment.bin>


More information about the libcxx-commits mailing list