Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

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 Andreas Radke (AndyRTR) - Tuesday, 02 November 2021, 19:01 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No



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

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