-
Notifications
You must be signed in to change notification settings - Fork 803
Description
Dear All,
I know that this is probably not a black-and-white issue, but this has hurt me on multiple platforms already...
When building LLVM out of the default (sycl) branch, by default it builds its own ocl-icd library. (libOpenCL.*) At first I tried to use -DOpenCL_BUILD_WITH_SYSTEM_SDK=TRUE as much as possible, but I've given up on that by now. In too many cases the system would have an OpenCL version that's too old for LLVM's SYCL implementation.
So fine, the LLVM build creates its own libOpenCL library, and builds all of itself against it. (Since #1260 it even does it correctly. 😛) So far, so good.
But that libOpenCL library is left behind in the build directory. It is not installed with LLVM. So in many cases I would end up with a compiler installation that works, it produces binaries successfully, but the binaries are unable to run correctly. Since all of a sudden they would need to work with an older/different OpenCL library.
For a Docker image that I've set up with this repository's build, I ended up performing the build with:
&& make && make install \
&& cp -P ${LLVM_BINARY_DIR}/lib/libOpenCL* ${LLVM_INSTALL_DIR}/lib/ \
(This is all part of a long Docker RUN command...)
So... long story short: Would it be possible to install the OpenCL library with LLVM itself? Or at least make it possible to install it (there could be a boolean option controlling this). I could propose an implementation as well, just wanted to bring it up as a question before embarking on it. 😉
Cheers,
Attila