[compiler-rt] r187968 - Simplify (and fix) check-dfsan configs

Alexey Samsonov samsonov at google.com
Thu Aug 8 01:26:40 PDT 2013


Author: samsonov
Date: Thu Aug  8 03:26:39 2013
New Revision: 187968

URL: http://llvm.org/viewvc/llvm-project?rev=187968&view=rev
Log:
Simplify (and fix) check-dfsan configs

Modified:
    compiler-rt/trunk/lib/dfsan/CMakeLists.txt
    compiler-rt/trunk/lib/dfsan/lit_tests/CMakeLists.txt
    compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in

Modified: compiler-rt/trunk/lib/dfsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/CMakeLists.txt?rev=187968&r1=187967&r2=187968&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/dfsan/CMakeLists.txt Thu Aug  8 03:26:39 2013
@@ -2,8 +2,8 @@ include_directories(..)
 
 # Runtime library sources and build flags.
 set(DFSAN_RTL_SOURCES
-  dfsan.cc
-  )
+  dfsan.cc)
+
 set(DFSAN_RTL_CFLAGS
   ${SANITIZER_COMMON_CFLAGS}
   # Prevent clang from generating libc calls.

Modified: compiler-rt/trunk/lib/dfsan/lit_tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/lit_tests/CMakeLists.txt?rev=187968&r1=187967&r2=187968&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/lit_tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/dfsan/lit_tests/CMakeLists.txt Thu Aug  8 03:26:39 2013
@@ -3,8 +3,7 @@ set(DFSAN_BINARY_DIR ${CMAKE_CURRENT_BIN
 
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-  )
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
 
 if(COMPILER_RT_CAN_EXECUTE_TESTS)
   # Run DFSan tests only if we're sure we may produce working binaries.
@@ -12,12 +11,10 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
     ${SANITIZER_COMMON_LIT_TEST_DEPS}
     ${DFSAN_RUNTIME_LIBRARIES})
   set(DFSAN_TEST_PARAMS
-    dfsan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-    )
+    dfsan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
   add_lit_testsuite(check-dfsan "Running the DataFlowSanitizer tests"
     ${CMAKE_CURRENT_BINARY_DIR}
     PARAMS ${DFSAN_TEST_PARAMS}
-    DEPENDS ${DFSAN_TEST_DEPS}
-    )
+    DEPENDS ${DFSAN_TEST_DEPS})
   set_target_properties(check-dfsan PROPERTIES FOLDER "DFSan tests")
 endif()

Modified: compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg?rev=187968&r1=187967&r2=187968&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg Thu Aug  8 03:26:39 2013
@@ -50,7 +50,7 @@ if llvm_src_root is None:
 
 # Setup default compiler flags used with -fsanitize=dataflow option.
 clang_dfsan_cflags = ["-fsanitize=dataflow"]
-clang_dfsan_cxxflags = ["-ccc-cxx "] + clang_dfsan_cflags
+clang_dfsan_cxxflags = ["--driver-mode=g++ "] + clang_dfsan_cflags
 config.substitutions.append( ("%clang_dfsan ",
                               " ".join([config.clang] + clang_dfsan_cflags) + 
                               " ") )

Modified: compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in?rev=187968&r1=187967&r2=187968&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in Thu Aug  8 03:26:39 2013
@@ -1,17 +1,5 @@
-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"
+# Load common config for all compiler-rt lit tests.
+lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
-# LLVM tools dir can be passed in lit parameters, so try to
-# apply substitution.
-try:
-  config.llvm_tools_dir = config.llvm_tools_dir % lit.params
-except KeyError,e:
-  key, = e.args
-  lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
-
-# Let the main config do the real work.
+# Load tool-specific config that would do the real work.
 lit.load_config(config, "@DFSAN_SOURCE_DIR@/lit_tests/lit.cfg")





More information about the llvm-commits mailing list