Skip to content

Commit 133cac7

Browse files
authored
[SYCL][HIP] Fix CMake lld dependency (#6403)
The dependency on lld for AMD HIP plugin was not wired up correctly which led to lld not being installed by default when the HIP plugin is enabled.
1 parent fed8a1a commit 133cac7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ jobs:
151151
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
152152
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
153153
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
154-
# TODO this should be resolved in CMakeLists.txt
155-
cmake --build $GITHUB_WORKSPACE/build --target install-lld || echo "skipped"
156154
157155
- name: Pack toolchain
158156
run: tar -cJf llvm_sycl.tar.xz -C $GITHUB_WORKSPACE/build/install .

sycl/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
403403

404404
add_dependencies(sycl-toolchain libspirv-builtins pi_hip)
405405
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libspirv-builtins pi_hip)
406+
407+
# On AMD platform lld is also needed
408+
if("${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD")
409+
add_dependencies(sycl-toolchain lld)
410+
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS lld)
411+
endif()
406412
endif()
407413

408414
if("esimd_emulator" IN_LIST SYCL_ENABLE_PLUGINS)

sycl/plugins/hip/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ if("${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "AMD")
3636

3737
# Set HIP define to select AMD platform
3838
target_compile_definitions(pi_hip PRIVATE __HIP_PLATFORM_AMD__)
39-
40-
# Make sure lld is built as part of the toolchain
41-
add_dependencies(sycl-toolchain lld)
4239
elseif("${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "NVIDIA")
4340
# Import CUDA libraries
4441
find_package(CUDA REQUIRED)

0 commit comments

Comments
 (0)