Home | History | Annotate | Download | only in msan
      1 include_directories(..)
      2 
      3 # Runtime library sources and build flags.
      4 set(MSAN_RTL_SOURCES
      5   msan.cc
      6   msan_allocator.cc
      7   msan_interceptors.cc
      8   msan_linux.cc
      9   msan_new_delete.cc
     10   msan_report.cc
     11   )
     12 set(MSAN_RTL_CFLAGS
     13   ${SANITIZER_COMMON_CFLAGS}
     14   -fno-rtti
     15   -fPIE
     16   # Prevent clang from generating libc calls.
     17   -ffreestanding)
     18 
     19 # Static runtime library.
     20 set(MSAN_RUNTIME_LIBRARIES)
     21 set(arch "x86_64")
     22 if(CAN_TARGET_${arch})
     23   add_compiler_rt_static_runtime(clang_rt.msan-${arch} ${arch}
     24     SOURCES ${MSAN_RTL_SOURCES}
     25             $<TARGET_OBJECTS:RTInterception.${arch}>
     26             $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
     27     CFLAGS ${MSAN_RTL_CFLAGS})
     28   list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch})
     29 endif()
     30 
     31 if(LLVM_INCLUDE_TESTS)
     32   add_subdirectory(tests)
     33 endif()
     34 
     35 add_subdirectory(lit_tests)
     36