summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Unit/lit.cfg5
-rw-r--r--test/lit.cfg5
2 files changed, 10 insertions, 0 deletions
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index ba4cbc5d79..1f6fce8912 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -81,3 +81,8 @@ if config.enable_shared:
shlibpath = os.pathsep + shlibpath
shlibpath = config.shlibdir + shlibpath
config.environment[config.shlibpath_var] = shlibpath
+
+# Setup paths to llvm-symbolizer for Sanitizer tools.
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'
diff --git a/test/lit.cfg b/test/lit.cfg
index 128bbe927a..4953bddf2d 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -90,6 +90,11 @@ config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '')
config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable',
'')
+# Setup paths to llvm-symbolizer for Sanitizer tools.
+llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'
+config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer'
+
###
import os