[SYCL][CMake] Enable LLVM_LINK_LLVM_DYLIB builds of the SYCL toolchain - #23052
[SYCL][CMake] Enable LLVM_LINK_LLVM_DYLIB builds of the SYCL toolchain#23052koparasy wants to merge 2 commits into
Conversation
|
@vmustya for your verifier. |
|
@intel/llvm-reviewers-runtime @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers can you please review? |
YuriPlyakhin
left a comment
There was a problem hiding this comment.
Is there a CI coverage for the configuration this PR enables?
I have not found LLVM_LINK_LLVM_DYLIB=ON under .github/workflows/ or in buildbot/configure.py.
Could you please add a --llvm-link-dylib-style switch to buildbot/configure.py and a nightly job (or even less frequent would be fine)?
did you mean: |
Done in 0de19b2 |
|
|
||
| linux_dylib_build: | ||
| if: github.repository == 'intel/llvm' | ||
| uses: ./.github/workflows/sycl-linux-build.yml |
There was a problem hiding this comment.
This looks to me as the common pattern in nightly, see https://github.com/intel/llvm/pull/23052/changes#diff-f8dae70b8775cf9c5fb547e9210ddc33d1e878401bfcf752b4fbdf16b1b601bbL55 . Can anyone verify that we can ignore this warning?
There was a problem hiding this comment.
yeah let's ignore this
KornevNikita
left a comment
There was a problem hiding this comment.
nightly changes lgtm
|
@intel/dpcpp-esimd-reviewers can you please review this. Thank you! |
| "-DLLVM_ENABLE_SPHINX={}".format(llvm_enable_sphinx), | ||
| "-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs), | ||
| "-DLLVM_LINK_LLVM_DYLIB={}".format(llvm_link_dylib), | ||
| "-DCLANG_LINK_CLANG_DYLIB={}".format(llvm_link_dylib), |
There was a problem hiding this comment.
There was a problem hiding this comment.
I believe what I have is more robust. If cmakelist.txt is modified (unlikely), I still want both of them to be enabled to test our build.
Do you want me to modify and skip the setting?
There was a problem hiding this comment.
I want to avoid side effects.
Example (I did not verify it though):
On Windows, CAN_BUILD_LLVM_DYLIB is OFF for MSVC, so cmake_dependent_option force-sets LLVM_LINK_LLVM_DYLIB=OFF:
Lines 977 to 983 in c2098bb
Explicit -DCLANG_LINK_CLANG_DYLIB=ON seems to result in error in the case, when 2 settings do not match:
Lines 360 to 363 in bf6137c
There was a problem hiding this comment.
But I let @intel/dpcpp-devops-reviewers make a decision, they own this configuration file.
YuriPlyakhin
left a comment
There was a problem hiding this comment.
changes in llvm LGTM
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:
dependency on LLVMSPIRVLib that formed an illegal cross-dylib cycle
(LLVM -> SYCLLowerIR -> GenXIntrinsics -> SPIRVLib
-> LLVM) and broke CMake configuration.
spirv-to-ir-wrapper and sycl-jit (matching llvm-spirv).
LLVMGenXIntrinsics INTERFACE include directories explicitly.
All changes are guarded by LLVM_LINK_LLVM_DYLIB; static builds are
unchanged.