2 sanitizer/asan_interface.h
3 sanitizer/common_interface_defs.h
4 sanitizer/dfsan_interface.h
5 sanitizer/linux_syscall_hooks.h
6 sanitizer/lsan_interface.h
7 sanitizer/msan_interface.h)
9 set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include)
12 set(other_output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include)
15 # Copy compiler-rt headers to the build tree.
17 foreach( f ${SANITIZER_HEADERS} )
18 set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
19 set( dst ${output_dir}/${f} )
20 add_custom_command(OUTPUT ${dst}
22 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
23 COMMENT "Copying compiler-rt's ${f}...")
24 list(APPEND out_files ${dst})
27 set(other_dst ${other_output_dir}/${f})
28 add_custom_command(OUTPUT ${other_dst}
30 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${other_dst}
31 COMMENT "Copying compiler-rt's ${f}...")
32 list(APPEND out_files ${other_dst})
36 add_custom_target(compiler-rt-headers ALL DEPENDS ${out_files})
37 add_dependencies(compiler-rt compiler-rt-headers)
39 # Install sanitizer headers.
40 install(FILES ${SANITIZER_HEADERS}
41 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
42 DESTINATION ${LIBCLANG_INSTALL_PATH}/include/sanitizer)