tsan: relax checking of errno spoiling in signal handlers
[blocksruntime.git] / lib / interception / CMakeLists.txt
blob1dfdaffb6dc13d73ed1281d90152307d0d0a26f4
1 # Build for the runtime interception helper library.
3 set(INTERCEPTION_SOURCES
4   interception_linux.cc
5   interception_mac.cc
6   interception_win.cc
7   interception_type_test.cc
8   )
10 include_directories(..)
12 set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS})
14 if(APPLE)
15   # Build universal binary on APPLE.
16   foreach(os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS})
17     add_compiler_rt_darwin_object_library(RTInterception ${os}
18       ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
19       SOURCES ${INTERCEPTION_SOURCES}
20       CFLAGS ${INTERCEPTION_CFLAGS})
21   endforeach()
22 elseif(ANDROID)
23   add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES})
24   set_target_compile_flags(RTInterception.arm.android
25     ${INTERCEPTION_CFLAGS})
26 else()
27   # Otherwise, build separate libraries for each target.
28   foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
29     add_compiler_rt_object_library(RTInterception ${arch}
30       SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
31   endforeach()
32 endif()