[compiler-rt] r185286 - Define the path to llvm-symbolizer tool in a common config to reduce copy-paste
Alexey Samsonov
samsonov at google.com
Sun Jun 30 07:47:38 PDT 2013
Author: samsonov
Date: Sun Jun 30 09:47:38 2013
New Revision: 185286
URL: http://llvm.org/viewvc/llvm-project?rev=185286&view=rev
Log:
Define the path to llvm-symbolizer tool in a common config to reduce copy-paste
Modified:
compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
compiler-rt/trunk/lib/lit.common.cfg
compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg
compiler-rt/trunk/lib/msan/lit_tests/lit.cfg
compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg
Modified: compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.cfg?rev=185286&r1=185285&r2=185286&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.cfg Sun Jun 30 09:47:38 2013
@@ -67,10 +67,7 @@ config.substitutions.append( ("%clangxx_
clang_asan_cxxflags + " ")) )
# Setup path to external LLVM symbolizer to run AddressSanitizer output tests.
-llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
-if llvm_tools_dir:
- config.environment['ASAN_SYMBOLIZER_PATH'] = os.path.join(
- llvm_tools_dir, "llvm-symbolizer")
+config.environment['ASAN_SYMBOLIZER_PATH'] = config.llvm_symbolizer_path
# Define CHECK-%os to check for OS-dependent output.
config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os)))
Modified: compiler-rt/trunk/lib/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lit.common.cfg?rev=185286&r1=185285&r2=185286&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lit.common.cfg Sun Jun 30 09:47:38 2013
@@ -40,6 +40,9 @@ if (not llvm_tools_dir) or (not os.path.
path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
+# Define path to external llvm-symbolizer tool.
+config.llvm_symbolizer_path = os.path.join(llvm_tools_dir, "llvm-symbolizer")
+
# Use ugly construction to explicitly prohibit "clang", "clang++" etc.
# in RUN lines.
config.substitutions.append(
Modified: compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg?rev=185286&r1=185285&r2=185286&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg Sun Jun 30 09:47:38 2013
@@ -12,10 +12,6 @@ def get_required_attr(config, attr_name)
"to lit.site.cfg " % attr_name)
return attr_value
-# Setup path to external LLVM symbolizer to run LeakSanitizer output tests.
-llvm_tools_dir = get_required_attr(config, 'llvm_tools_dir')
-config.llvm_symbolizer_path = os.path.join(llvm_tools_dir, "llvm-symbolizer")
-
# Setup source root.
lsan_lit_src_root = get_required_attr(config, 'lsan_lit_src_root')
config.test_source_root = os.path.join(lsan_lit_src_root, 'TestCases')
Modified: compiler-rt/trunk/lib/msan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/lit.cfg?rev=185286&r1=185285&r2=185286&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/lit.cfg Sun Jun 30 09:47:38 2013
@@ -63,10 +63,7 @@ config.substitutions.append( ("%clangxx_
" ") )
# Setup path to external LLVM symbolizer to run MemorySanitizer output tests.
-llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
-if llvm_tools_dir:
- llvm_symbolizer_path = os.path.join(llvm_tools_dir, "llvm-symbolizer")
- config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_symbolizer_path
+config.environment['MSAN_SYMBOLIZER_PATH'] = config.llvm_symbolizer_path
# Default test suffixes.
config.suffixes = ['.c', '.cc', '.cpp']
Modified: compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg?rev=185286&r1=185285&r2=185286&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg Sun Jun 30 09:47:38 2013
@@ -50,11 +50,8 @@ if llvm_src_root is None:
# Setup environment variables for running ThreadSanitizer.
tsan_options = "atexit_sleep_ms=0"
-# Get path to external LLVM symbolizer to run ThreadSanitizer output tests.
-llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
-if llvm_tools_dir:
- llvm_symbolizer_path = os.path.join(llvm_tools_dir, "llvm-symbolizer")
- tsan_options += " " + "external_symbolizer_path=" + llvm_symbolizer_path
+# Set path to external LLVM symbolizer to run ThreadSanitizer output tests.
+tsan_options += " " + "external_symbolizer_path=" + config.llvm_symbolizer_path
config.environment['TSAN_OPTIONS'] = tsan_options
More information about the llvm-commits
mailing list