Home | History | Annotate | Download | only in interception
      1 # Build for the runtime interception helper library.
      2 
      3 set(INTERCEPTION_SOURCES
      4   interception_linux.cc
      5   interception_mac.cc
      6   interception_win.cc
      7   interception_type_test.cc
      8   )
      9 
     10 include_directories(..)
     11 
     12 set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS})
     13 
     14 if(APPLE)
     15   # Build universal binary on APPLE.
     16   add_compiler_rt_osx_object_library(RTInterception
     17     ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
     18     SOURCES ${INTERCEPTION_SOURCES}
     19     CFLAGS ${INTERCEPTION_CFLAGS})
     20 elseif(ANDROID)
     21   add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES})
     22   set_target_compile_flags(RTInterception.arm.android
     23     ${INTERCEPTION_CFLAGS})
     24 else()
     25   # Otherwise, build separate libraries for each target.
     26   foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
     27     add_compiler_rt_object_library(RTInterception ${arch}
     28       SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
     29   endforeach()
     30 endif()
     31