Skip to content

Commit d18e69c

Browse files
author
Alexander Batashev
authored
[SYCL] Fix post-commit build in tools (#5746)
1 parent 8878962 commit d18e69c

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

sycl/tools/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
function(link_llvm_libs target)
2+
foreach(LIB ${ARGN})
3+
target_include_directories(${target} SYSTEM PRIVATE ${LLVM_MAIN_INCLUDE_DIR})
4+
target_link_libraries(${target} PRIVATE ${LIB})
5+
endforeach()
6+
endfunction()
7+
18
add_subdirectory(sycl-ls)
29

310
if (SYCL_ENABLE_XPTI_TRACING)

sycl/tools/sycl-prof/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ target_include_directories(sycl-prof PRIVATE
66
"${CMAKE_CURRENT_SOURCE_DIR}/../xpti_helpers/"
77
)
88

9-
target_link_libraries(sycl-prof PRIVATE
9+
link_llvm_libs(sycl-prof
1010
LLVMSupport
1111
)
1212

sycl/tools/sycl-sanitize/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ target_include_directories(sycl-sanitize PRIVATE
44
"${CMAKE_CURRENT_SOURCE_DIR}/../xpti_helpers/"
55
)
66

7-
target_link_libraries(sycl-sanitize PRIVATE
7+
link_llvm_libs(sycl-sanitize
88
LLVMSupport
99
)
1010

sycl/tools/sycl-trace/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ target_include_directories(sycl-trace PRIVATE
66

77
target_compile_options(sycl-trace PRIVATE -fno-exceptions -fno-rtti)
88

9-
target_link_libraries(sycl-trace PRIVATE
9+
link_llvm_libs(sycl-trace
1010
LLVMSupport
1111
)
1212

0 commit comments

Comments
 (0)