2013-04-11 23:49:52 +08:00
|
|
|
set(SANITIZER_HEADERS
|
2014-07-08 01:39:31 +08:00
|
|
|
sanitizer/allocator_interface.h
|
2013-04-11 23:49:52 +08:00
|
|
|
sanitizer/asan_interface.h
|
|
|
|
sanitizer/common_interface_defs.h
|
2015-02-04 03:40:53 +08:00
|
|
|
sanitizer/coverage_interface.h
|
2013-08-08 06:47:26 +08:00
|
|
|
sanitizer/dfsan_interface.h
|
2016-07-09 12:13:25 +08:00
|
|
|
sanitizer/esan_interface.h
|
2013-04-11 23:49:52 +08:00
|
|
|
sanitizer/linux_syscall_hooks.h
|
2013-06-14 19:45:36 +08:00
|
|
|
sanitizer/lsan_interface.h
|
2013-12-11 16:18:50 +08:00
|
|
|
sanitizer/msan_interface.h
|
|
|
|
sanitizer/tsan_interface_atomic.h)
|
2013-04-11 23:49:52 +08:00
|
|
|
|
2016-07-21 15:39:55 +08:00
|
|
|
set(XRAY_HEADERS
|
|
|
|
xray/xray_interface.h)
|
|
|
|
|
|
|
|
set(COMPILER_RT_HEADERS
|
|
|
|
${SANITIZER_HEADERS}
|
|
|
|
${XRAY_HEADERS})
|
|
|
|
|
2014-02-18 22:28:53 +08:00
|
|
|
set(output_dir ${COMPILER_RT_OUTPUT_DIR}/include)
|
2013-04-11 23:49:52 +08:00
|
|
|
|
|
|
|
# Copy compiler-rt headers to the build tree.
|
|
|
|
set(out_files)
|
2016-07-21 15:39:55 +08:00
|
|
|
foreach( f ${COMPILER_RT_HEADERS} )
|
2013-04-11 23:49:52 +08:00
|
|
|
set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
|
|
|
|
set( dst ${output_dir}/${f} )
|
|
|
|
add_custom_command(OUTPUT ${dst}
|
|
|
|
DEPENDS ${src}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
|
|
|
|
COMMENT "Copying compiler-rt's ${f}...")
|
|
|
|
list(APPEND out_files ${dst})
|
|
|
|
endforeach( f )
|
|
|
|
|
|
|
|
add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files})
|
2013-11-18 18:57:36 +08:00
|
|
|
add_dependencies(compiler-rt compiler-rt-headers)
|
2016-07-12 05:51:56 +08:00
|
|
|
set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
|
2013-04-11 23:49:52 +08:00
|
|
|
|
|
|
|
# Install sanitizer headers.
|
|
|
|
install(FILES ${SANITIZER_HEADERS}
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
2014-02-18 22:28:53 +08:00
|
|
|
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
|
2016-07-21 15:39:55 +08:00
|
|
|
# Install xray headers.
|
|
|
|
install(FILES ${XRAY_HEADERS}
|
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
|