diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-07 22:47:26 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-07 22:47:26 +0000 |
commit | eee71ae5c1f4ce71612fac359463a54bc867abd6 (patch) | |
tree | 5c409caf5a9cab03b52d01c0712ad0d9820a0247 /lib/dfsan/CMakeLists.txt | |
parent | 653e4526c70eb3d47780ed57553bc41c4b3cc1d6 (diff) |
DataFlowSanitizer; compiler-rt changes.
DataFlowSanitizer is a generalised dynamic data flow analysis.
Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.
Differential Revision: http://llvm-reviews.chandlerc.com/D967
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/dfsan/CMakeLists.txt')
-rw-r--r-- | lib/dfsan/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt new file mode 100644 index 000000000..8ac9532d9 --- /dev/null +++ b/lib/dfsan/CMakeLists.txt @@ -0,0 +1,29 @@ +include_directories(..) + +# Runtime library sources and build flags. +set(DFSAN_RTL_SOURCES + dfsan.cc + ) +set(DFSAN_RTL_CFLAGS + ${SANITIZER_COMMON_CFLAGS} + # Prevent clang from generating libc calls. + -ffreestanding) + +# Static runtime library. +set(DFSAN_RUNTIME_LIBRARIES) +set(arch "x86_64") +if(CAN_TARGET_${arch}) + add_compiler_rt_static_runtime(clang_rt.dfsan-${arch} ${arch} + SOURCES ${DFSAN_RTL_SOURCES} + $<TARGET_OBJECTS:RTInterception.${arch}> + $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> + $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> + CFLAGS ${DFSAN_RTL_CFLAGS} -fPIE) + add_compiler_rt_static_runtime(clang_rt.dfsan-libc-${arch} ${arch} + SOURCES ${DFSAN_RTL_SOURCES} + $<TARGET_OBJECTS:RTSanitizerCommon.${arch}> + CFLAGS ${DFSAN_RTL_CFLAGS} -fPIC -DDFSAN_NOLIBC) + list(APPEND DFSAN_RUNTIME_LIBRARIES clang_rt.dfsan-${arch}) +endif() + +add_subdirectory(lit_tests) |