[llvm-commits] [compiler-rt] r164819 - in /compiler-rt/trunk/lib/asan/lit_tests: CMakeLists.txt lit.cfg lit.site.cfg.in
Alexey Samsonov
samsonov at google.com
Fri Sep 28 04:05:42 PDT 2012
Author: samsonov
Date: Fri Sep 28 06:05:41 2012
New Revision: 164819
URL: http://llvm.org/viewvc/llvm-project?rev=164819&view=rev
Log:
[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
Modified:
compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt
compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in
Modified: compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt?rev=164819&r1=164818&r2=164819&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/CMakeLists.txt Fri Sep 28 06:05:41 2012
@@ -18,6 +18,9 @@
clang clang-headers FileCheck count not llvm-nm
${ASAN_RUNTIME_LIBRARIES}
)
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+ list(APPEND ASAN_TEST_DEPS llvm-symbolizer)
+ endif()
set(ASAN_TEST_PARAMS
asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.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=164819&r1=164818&r2=164819&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.cfg Fri Sep 28 06:05:41 2012
@@ -68,6 +68,15 @@
config.substitutions.append( ("%clangxx_asan ", (" " + config.clang + " " +
clang_asan_cxxflags + " ")) )
+# Setup path to external LLVM symbolizer to run AddressSanitizer output tests.
+# Currently llvm-symbolizer is supported on Linux only.
+if config.host_os == 'Linux':
+ llvm_obj_root = getattr(config, 'llvm_obj_root', None)
+ if llvm_obj_root:
+ config.environment['LLVM_SYMBOLIZER_PATH'] = os.path.join(
+ config.llvm_obj_root, "projects", "compiler-rt", "utils",
+ "llvm-symbolizer", "llvm-symbolizer")
+
# Setup path to symbolizer script.
# FIXME: Instead we should copy this script to the build tree and point
# at it there.
Modified: compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in?rev=164819&r1=164818&r2=164819&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.site.cfg.in Fri Sep 28 06:05:41 2012
@@ -4,6 +4,7 @@
config.target_triple = "@TARGET_TRIPLE@"
config.host_os = "@HOST_OS@"
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.clang = "@LLVM_BINARY_DIR@/bin/clang"
More information about the llvm-commits
mailing list