aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 8f27781523..9ba5915d8d 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -84,3 +84,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 f22b0376b4..ea835ccb19 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -142,6 +142,11 @@ if config.test_exec_root is None:
lit.load_config(config, site_cfg)
raise SystemExit
+# 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'
+
###
# Discover the 'clang' and 'clangcc' to use.