1 # Build for the ThreadSanitizer runtime support library. 2 3 include_directories(..) 4 5 set(TSAN_CFLAGS 6 ${SANITIZER_COMMON_CFLAGS} 7 -fno-rtti) 8 # FIXME: Add support for compile flags: 9 # -Wframe-larger-than=512, 10 # -Wglobal-constructors, 11 # --sysroot=. 12 13 if("${CMAKE_BUILD_TYPE}" EQUAL "Release") 14 set(TSAN_COMMON_DEFINITIONS DEBUG=0) 15 else() 16 set(TSAN_COMMON_DEFINITIONS DEBUG=1) 17 endif() 18 19 add_subdirectory(rtl) 20 21 if(LLVM_INCLUDE_TESTS) 22 add_subdirectory(tests) 23 endif() 24 add_subdirectory(lit_tests) 25