FS#72588 - [clang] Consider splitting the library and compiler parts like llvm

Attached to Project: Arch Linux
Opened by Emil (xexaxo) - Saturday, 30 October 2021, 18:45 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:17 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

Currently the clang package provides both the compiler toolchain and backend libraries.

If we have a OpenCL workload - we would install opencl-mesa or intel-opencl-clang. Either of them pulls the complete clang and all its dependencies - compiler-rt, gcc and binutils et al. Which is just wasteful, since we don't need neither the clang frontend nor gcc and friends.

Thus instead of having ~80 MiB libclang libraries, we get 400 MiB of packages.

Please consider splitting the clang compiler toolchain and libraries into separate packages. Just like we have llvm and llvm-libs.

Additional info:
* package version(s) - clang 12.0.1-1

Steps to reproduce:
- get a simple Arch install, lacking any base-devel pkgs
- pacman -S mesa - install overall mesa driver-set
- pacman -S opencl-mesa - observe compiler-rt, gcc and binutils being pulled
- manually remove said packages, remove all of clang but /usr/lib/libclang*
- opencl drivers work \o/
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:17 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/clang/issues/1
Comment by Emil (xexaxo) - Sunday, 30 January 2022, 20:21 GMT
Here's a patch I've been using for a few months now - it work like a charm.
Any chance we can get it merged, or variation thereof?
Comment by Emil (xexaxo) - Thursday, 31 March 2022, 15:48 GMT
Humble poke - can I help in any shape or form here?

This task/patch partially helps with https://bugs.archlinux.org/task/57215
Comment by Emil (xexaxo) - Saturday, 25 February 2023, 15:47 GMT
Humble poke? Happy to help to move this further - respin the patch or otherwise.
Comment by Lone_Wolf (Lone_Wolf) - Saturday, 15 April 2023, 14:03 GMT
Interesting idea, this BR motivated me to split off clang runtime libs in AUR llvm-minimal-git.

(llvm-libs-minimal-git had gained a clang runtime lib a while ago and splitting of clang runtime libs makes sense)

Comment by blackmoon3 (blackmoon3) - Monday, 17 April 2023, 19:10 GMT
@Emil (xexaxo)

I just want to understand why scan-build, libear, libscanbuild, libexec are moved in the clang-libs package?
Comment by Emil (xexaxo) - Tuesday, 18 April 2023, 11:58 GMT
@blackmoon3 it's been over one year, so I don't recall to be honest. Off the top of my head, it seems like they* should be better suited in the `clang` package itself.

By "they" I mean /usr/bin/scan-build and the python-scripts - both the libraries /usr/lib/python-3.10/site-packages/ and /usr/lib/clang/.
Comment by Emil (xexaxo) - Wednesday, 21 June 2023, 13:32 GMT
Humble poke anyone? As said before I'm happy to help in any shape or form.
Comment by Emil (xexaxo) - Tuesday, 12 September 2023, 08:53 GMT
Another friendly ping (-:

Loading...