Skip to content

Commit 49911de

Browse files
Install matching gdb xmethod next to libsycl.so (#1106)
Original installation layout required explicit loading of the python module via user-configured .gdbinit, which has been decided sub-optimal. New naming/placement will allow to make use of https://sourceware.org/gdb/current/onlinedocs/gdb/Python-Auto_002dloading.html Signed-off-by: Mihails Strasuns <[email protected]>
1 parent 438dc49 commit 49911de

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

sycl/CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ endif()
5151
set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCHLEVEL}")
5252

5353
set(LLVM_INST_INC_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include")
54-
set(LLVM_PYTHON_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/python")
5554
set(dst_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
5655

5756
# Find OpenCL headers and libraries installed in the system and use them to
@@ -151,12 +150,6 @@ COMMENT "Copying SYCL headers ...")
151150
# Configure SYCL headers
152151
install(DIRECTORY "${sycl_inc_dir}/." DESTINATION "${LLVM_INST_INC_DIRECTORY}" COMPONENT sycl-headers)
153152

154-
# Auxilliary extras for SYCL headers
155-
add_custom_target(sycl-headers-extras ALL
156-
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/xmethods ${dst_dir}
157-
COMMENT "Copying SYCL header xmethod scripts ...")
158-
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/xmethods" DESTINATION ${LLVM_PYTHON_DIRECTORY} COMPONENT sycl-headers-extras)
159-
160153
set(SYCL_RT_LIBS sycl)
161154
if (MSVC)
162155
list(APPEND SYCL_RT_LIBS sycld)
@@ -194,6 +187,11 @@ endfunction(add_common_options)
194187
# SYCL runtime library
195188
add_subdirectory( source )
196189

190+
# Auxilliary extras for SYCL headers/library
191+
if (NOT WIN32)
192+
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/xmethods/$<TARGET_FILE_NAME:sycl>-gdb.py" DESTINATION lib COMPONENT sycl-headers-extras)
193+
endif()
194+
197195
# SYCL toolchain builds all components: compiler, libraries, headers, etc.
198196
add_custom_target( sycl-toolchain
199197
DEPENDS ${SYCL_RT_LIBS}
File renamed without changes.

0 commit comments

Comments
 (0)