brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 57c8c8b Raw
47 lines · plain
1# Build for the runtime interception helper library.2 3set(INTERCEPTION_SOURCES4  interception_aix.cpp5  interception_linux.cpp6  interception_mac.cpp7  interception_win.cpp8  interception_type_test.cpp9  )10 11set(INTERCEPTION_HEADERS12  interception.h13  interception_aix.h14  interception_linux.h15  interception_mac.h16  interception_win.h17  )18 19if(MSVC)20  # asan on windows only supports the release dll version of the runtimes, in the interest of21  # only having one asan dll to support/test. Having asan statically linked22  # with the runtime might be possible, but it multiplies the number of scenerios to test.23  # the program USING sanitizers can use whatever version of the runtime it wants to.24  set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)25endif()26 27include_directories(..)28 29set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS})30append_rtti_flag(OFF INTERCEPTION_CFLAGS)31 32# Silence warnings in system headers with MSVC.33if(NOT CLANG_CL)34  append_list_if(COMPILER_RT_HAS_EXTERNAL_FLAG "/experimental:external;/external:W0;/external:anglebrackets" INTERCEPTION_CFLAGS)35endif()36 37add_compiler_rt_object_libraries(RTInterception38    OS ${SANITIZER_COMMON_SUPPORTED_OS}39    ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}40    SOURCES ${INTERCEPTION_SOURCES}41    ADDITIONAL_HEADERS ${INTERCEPTION_HEADERS}42    CFLAGS ${INTERCEPTION_CFLAGS})43 44if(COMPILER_RT_INCLUDE_TESTS)45  add_subdirectory(tests)46endif()47