diff options
| -rw-r--r-- | compiler-rt/lib/dfsan/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | compiler-rt/lib/dfsan/lit_tests/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | compiler-rt/lib/dfsan/lit_tests/lit.cfg | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/dfsan/lit_tests/lit.site.cfg.in | 18 |
4 files changed, 9 insertions, 24 deletions
diff --git a/compiler-rt/lib/dfsan/CMakeLists.txt b/compiler-rt/lib/dfsan/CMakeLists.txt index 8ac9532d915..3d96c080c73 100644 --- a/compiler-rt/lib/dfsan/CMakeLists.txt +++ b/compiler-rt/lib/dfsan/CMakeLists.txt @@ -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. diff --git a/compiler-rt/lib/dfsan/lit_tests/CMakeLists.txt b/compiler-rt/lib/dfsan/lit_tests/CMakeLists.txt index 7b800fe1ae3..67888dfb9cf 100644 --- a/compiler-rt/lib/dfsan/lit_tests/CMakeLists.txt +++ b/compiler-rt/lib/dfsan/lit_tests/CMakeLists.txt @@ -3,8 +3,7 @@ set(DFSAN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/..) 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() diff --git a/compiler-rt/lib/dfsan/lit_tests/lit.cfg b/compiler-rt/lib/dfsan/lit_tests/lit.cfg index ce39f4a507f..0daface1eb8 100644 --- a/compiler-rt/lib/dfsan/lit_tests/lit.cfg +++ b/compiler-rt/lib/dfsan/lit_tests/lit.cfg @@ -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) + " ") ) diff --git a/compiler-rt/lib/dfsan/lit_tests/lit.site.cfg.in b/compiler-rt/lib/dfsan/lit_tests/lit.site.cfg.in index 7586c149a8c..d9eb836b92d 100644 --- a/compiler-rt/lib/dfsan/lit_tests/lit.site.cfg.in +++ b/compiler-rt/lib/dfsan/lit_tests/lit.site.cfg.in @@ -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") |

