Skip to content

[SYCL][CMake] Enable LLVM_LINK_LLVM_DYLIB builds of the SYCL toolchain - #23052

Open
koparasy wants to merge 1 commit into
intel:syclfrom
koparasy:update-vc-intrinsics
Open

[SYCL][CMake] Enable LLVM_LINK_LLVM_DYLIB builds of the SYCL toolchain#23052
koparasy wants to merge 1 commit into
intel:syclfrom
koparasy:update-vc-intrinsics

Conversation

@koparasy

Copy link
Copy Markdown
Contributor

Enable building the SYCL toolchain with -DLLVM_LINK_LLVM_DYLIB=ON
(-DCLANG_LINK_CLANG_DYLIB=ON), previously unsupported.

This is a needed change to allow clang plugins to be loaded during compilation
of sycl code.

Under dylib, tools link libLLVM.so instead of the LLVM component
libraries and so don't inherit their INTERFACE properties. Fixes:

  • Bump the vc-intrinsics pin to 0c3296b, which drops a spurious
    LLVMSPIRVLib dependency on LLVMGenXIntrinsics that formed an illegal
    cross-dylib cycle (LLVM -> SYCLLowerIR -> GenXIntrinsics -> SPIRVLib
    -> LLVM) and broke CMake configuration.
  • LLVMSPIRVLib is not part of libLLVM.so: link it explicitly in
    spirv-to-ir-wrapper and sycl-jit (matching llvm-spirv).
  • sycl-post-link and sycl-jit include vc-intrinsics headers; add the
    LLVMGenXIntrinsics INTERFACE include directories explicitly.

All changes are guarded by LLVM_LINK_LLVM_DYLIB; static builds are
unchanged.

@koparasy
koparasy requested review from a team and cperkinsintel as code owners August 28, 2026 16:43
@koparasy

Copy link
Copy Markdown
Contributor Author

@vmustya for your verifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant