2012-06-25 16:40:10 +08:00
|
|
|
# Build for the runtime interception helper library.
|
|
|
|
|
|
|
|
set(INTERCEPTION_SOURCES
|
2019-08-01 02:01:55 +08:00
|
|
|
interception_linux.cpp
|
|
|
|
interception_mac.cpp
|
|
|
|
interception_win.cpp
|
|
|
|
interception_type_test.cpp
|
2019-01-17 02:12:45 +08:00
|
|
|
)
|
2018-07-10 21:00:17 +08:00
|
|
|
|
|
|
|
set(INTERCEPTION_HEADERS
|
|
|
|
interception.h
|
|
|
|
interception_linux.h
|
|
|
|
interception_mac.h
|
2019-01-17 02:12:45 +08:00
|
|
|
interception_win.h
|
|
|
|
)
|
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})
|
2016-03-05 18:01:04 +08:00
|
|
|
append_rtti_flag(OFF INTERCEPTION_CFLAGS)
|
2012-06-25 16:40:10 +08:00
|
|
|
|
2022-01-11 23:36:46 +08:00
|
|
|
# Silence warnings in system headers with MSVC.
|
2022-01-16 00:59:46 +08:00
|
|
|
if(NOT CLANG_CL)
|
|
|
|
append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external /external:W0 /external:anglebrackets" INTERCEPTION_CFLAGS)
|
|
|
|
endif()
|
2022-01-11 23:36:46 +08:00
|
|
|
|
2015-06-11 07:55:07 +08:00
|
|
|
add_compiler_rt_object_libraries(RTInterception
|
|
|
|
OS ${SANITIZER_COMMON_SUPPORTED_OS}
|
2015-06-19 11:39:24 +08:00
|
|
|
ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
|
2015-06-11 07:55:07 +08:00
|
|
|
SOURCES ${INTERCEPTION_SOURCES}
|
2018-07-10 21:00:17 +08:00
|
|
|
ADDITIONAL_HEADERS ${INTERCEPTION_HEADERS}
|
2015-06-11 07:55:07 +08:00
|
|
|
CFLAGS ${INTERCEPTION_CFLAGS})
|
2016-07-07 03:15:11 +08:00
|
|
|
|
|
|
|
if(COMPILER_RT_INCLUDE_TESTS)
|
|
|
|
add_subdirectory(tests)
|
|
|
|
endif()
|