1 # Build for the XRay runtime support library.
3 # Core XRay runtime library implementation files.
10 # XRay flight data recorder (FDR) implementation files.
16 xray_trampoline_x86_64.S
24 set(armhf_SOURCES ${arm_SOURCES})
28 xray_trampoline_AArch64.S
31 include_directories(..)
32 include_directories(../../include)
34 set(XRAY_CFLAGS ${SANITIZER_COMMON_CFLAGS})
35 set(XRAY_COMMON_DEFINITIONS XRAY_HAS_EXCEPTIONS=1)
37 COMPILER_RT_HAS_XRAY_COMPILER_FLAG XRAY_SUPPORTED=1 XRAY_COMMON_DEFINITIONS)
39 add_compiler_rt_object_libraries(RTXray
40 ARCHS ${XRAY_SUPPORTED_ARCH}
41 SOURCES ${XRAY_SOURCES} CFLAGS ${XRAY_CFLAGS}
42 DEFS ${XRAY_COMMON_DEFINITIONS})
44 add_compiler_rt_object_libraries(RTXrayFDR
45 ARCHS ${XRAY_SUPPORTED_ARCH}
46 SOURCES ${XRAY_FDR_SOURCES} CFLAGS ${XRAY_CFLAGS}
47 DEFS ${XRAY_COMMON_DEFINITIONS})
49 add_compiler_rt_component(xray)
50 add_compiler_rt_component(xray-fdr)
52 set(XRAY_COMMON_RUNTIME_OBJECT_LIBS
54 RTSanitizerCommonLibc)
56 foreach(arch ${XRAY_SUPPORTED_ARCH})
57 if(CAN_TARGET_${arch})
58 add_compiler_rt_runtime(clang_rt.xray
61 SOURCES ${${arch}_SOURCES}
63 DEFS ${XRAY_COMMON_DEFINITIONS}
64 OBJECT_LIBS ${XRAY_COMMON_RUNTIME_OBJECT_LIBS}
66 add_compiler_rt_runtime(clang_rt.xray-fdr
69 SOURCES ${XRAY_FDR_SOURCES}
71 DEFS ${XRAY_COMMON_DEFINITIONS}
72 OBJECT_LIBS ${XRAY_COMMON_RUNTIME_OBJECT_LIBS}
73 PARENT_TARGET xray-fdr)
77 if(COMPILER_RT_INCLUDE_TESTS)
78 add_subdirectory(tests)