1 # Build for the experimental deadlock detector runtime library.
3 include_directories(../..)
5 set(DD_CFLAGS ${SANITIZER_COMMON_CFLAGS})
6 append_rtti_flag(OFF DD_CFLAGS)
14 ${COMPILER_RT_UNWINDER_LINK_LIBS}
15 ${SANITIZER_CXX_ABI_LIBRARIES}
16 ${SANITIZER_COMMON_LINK_LIBS})
18 append_list_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)
19 append_list_if(COMPILER_RT_HAS_LIBRT rt DD_LINKLIBS)
20 append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread DD_LINKLIBS)
23 set_target_properties(dd PROPERTIES FOLDER "Compiler-RT Misc")
25 # Deadlock detector is currently supported on 64-bit Linux only.
26 if(CAN_TARGET_x86_64 AND UNIX AND NOT APPLE AND NOT ANDROID)
28 add_compiler_rt_runtime(clang_rt.dd
32 $<TARGET_OBJECTS:RTInterception.${arch}>
33 $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
34 $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
38 add_compiler_rt_object_libraries(RTDD
40 SOURCES ${DD_SOURCES} CFLAGS ${DD_CFLAGS})
42 add_compiler_rt_runtime(clang_rt.dyndd
45 SOURCES $<TARGET_OBJECTS:RTDD.${arch}>
46 $<TARGET_OBJECTS:RTInterception.${arch}>
47 $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
48 $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
49 $<TARGET_OBJECTS:RTSanitizerCommonSymbolizer.${arch}>
50 LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS}
51 LINK_LIBS ${DD_LINKLIBS}
55 add_dependencies(compiler-rt dd)