[SYCL] Move Linux device library install out of lib/ and into lib/dpcpp-(major_version)/sycl (#22036)#22160
Merged
Merged
Conversation
…pp-(major_version)/sycl (intel#22036) Cherry pick of 29ee2a6 Currently, we install all libdevice files to `lib/`. We are trying to improve our packaging to make it easier for Linux distros to package the compiler, and installing dozens of .bc files to `/usr/lib` breaks many distro policies. The main problems are that these files have no use to end users or applications using SYCL, they are only needed by the SYCL compiler itself. Installing to `/usr/lib/libsycl-crt.bc` for example doesn't make sense. This change proposes moving the files to `lib/dpcpp-DPCPP_MAJOR_VERSION/sycl`, so a real example would be `lib/dpcpp-7/sycl`. This change is being made only for Linux, as the file packaging is already much different for Windows, for example today we put libraries in general (such as `libsycl.dll`) in `bin/` but `libdevice` files in `lib`, so I don't see any need to match the behavior between OSes and complicate the Driver code even more. Note the `libdevice` code also generates a host static library, `libsycl-devicelib-host.a`, which is completely untouched by this PR. Closes: intel#21512 --------- Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
KornevNikita
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry pick of 29ee2a6
Currently, we install all libdevice files to
lib/. We are trying to improve our packaging to make it easier for Linux distros to package the compiler, and installing dozens of .bc files to/usr/libbreaks many distro policies. The main problems are that these files have no use to end users or applications using SYCL, they are only needed by the SYCL compiler itself. Installing to/usr/lib/libsycl-crt.bcfor example doesn't make sense.This change proposes moving the files to
lib/dpcpp-DPCPP_MAJOR_VERSION/sycl, so a real example would belib/dpcpp-7/sycl.This change is being made only for Linux, as the file packaging is already much different for Windows, for example today we put libraries in general (such as
libsycl.dll) inbin/butlibdevicefiles inlib, so I don't see any need to match the behavior between OSes and complicate the Driver code even more.Note the
libdevicecode also generates a host static library,libsycl-devicelib-host.a, which is completely untouched by this PR.Closes: #21512