2012-06-25 16:40:10 +08:00
|
|
|
# Build for the runtime interception helper library.
|
|
|
|
|
|
|
|
set(INTERCEPTION_SOURCES
|
|
|
|
interception_linux.cc
|
|
|
|
interception_mac.cc
|
|
|
|
interception_win.cc
|
2013-02-07 15:37:12 +08:00
|
|
|
interception_type_test.cc
|
2012-06-25 16:40:10 +08:00
|
|
|
)
|
|
|
|
|
2013-01-30 22:27:41 +08:00
|
|
|
include_directories(..)
|
|
|
|
|
2014-02-18 15:52:40 +08:00
|
|
|
set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS})
|
|
|
|
append_no_rtti_flag(INTERCEPTION_CFLAGS)
|
2012-06-25 16:40:10 +08:00
|
|
|
|
2012-08-10 22:45:52 +08:00
|
|
|
if(APPLE)
|
|
|
|
# Build universal binary on APPLE.
|
2013-11-07 18:08:19 +08:00
|
|
|
foreach(os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS})
|
|
|
|
add_compiler_rt_darwin_object_library(RTInterception ${os}
|
|
|
|
ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
|
|
|
|
SOURCES ${INTERCEPTION_SOURCES}
|
|
|
|
CFLAGS ${INTERCEPTION_CFLAGS})
|
|
|
|
endforeach()
|
2012-08-10 22:45:52 +08:00
|
|
|
else()
|
|
|
|
# Otherwise, build separate libraries for each target.
|
2013-01-19 00:51:07 +08:00
|
|
|
foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
|
|
|
|
add_compiler_rt_object_library(RTInterception ${arch}
|
2013-01-19 00:05:21 +08:00
|
|
|
SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
|
2013-01-19 00:51:07 +08:00
|
|
|
endforeach()
|
2012-06-25 16:40:10 +08:00
|
|
|
endif()
|