FS#79519 - [llvm] static libraries removal

Attached to Project: Arch Linux
Opened by Thomas Spader (spader) - Wednesday, 30 August 2023, 19:00 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 30 August 2023, 23:40 GMT
Task Type General Gripe
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
LLVM doesn't ship with static libraries (pretty sure the change is here: https://gitlab.archlinux.org/archlinux/packaging/packages/llvm/-/commit/3e452a15b68d156a9ef5608e8f6e1870d192d954). I think that's fine for consumers of LLVM, but I'm working on a compiler, and I need the static libraries as part of the build process for the Rust crate llvm-sys. In general, any program that links to LLVM statically and uses llvm-config will expect these libraries.

Steps to reproduce:
Just try `llvm-config`:
$ llvm-config --libnames --link-static
llvm-config: error: missing: /usr/lib/libLLVMTargetParser.a
llvm-config: error: missing: /usr/lib/libLLVMBinaryFormat.a
llvm-config: error: missing: /usr/lib/libLLVMBitstreamReader.a
llvm-config: error: missing: /usr/lib/libLLVMRemarks.a
llvm-config: error: missing: /usr/lib/libLLVMCore.a
llvm-config: error: missing: /usr/lib/libLLVMFuzzerCLI.a
llvm-config: error: missing: /usr/lib/libLLVMBitReader.a
llvm-config: error: missing: /usr/lib/libLLVMDebugInfoCodeView.a
llvm-config: error: missing: /usr/lib/libLLVMMC.a
llvm-config: error: missing: /usr/lib/libLLVMAsmParser.a
llvm-config: error: missing: /usr/lib/libLLVMIRReader.a
llvm-config: error: missing: /usr/lib/libLLVMMCParser.a
llvm-config: error: missing: /usr/lib/libLLVMTextAPI.a
llvm-config: error: missing: /usr/lib/libLLVMObject.a
llvm-config: error: missing: /usr/lib/libLLVMDebugInfoDWARF.a
llvm-config: error: missing: /usr/lib/libLLVMDebugInfoMSF.a
llvm-config: error: missing: /usr/lib/libLLVMDebugInfoPDB.a
llvm-config: error: missing: /usr/lib/libLLVMSymbolize.a
llvm-config: error: missing: /usr/lib/libLLVMProfileData.a
llvm-config: error: missing: /usr/lib/libLLVMAnalysis.a
(...and so on)


This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Wednesday, 30 August 2023, 23:40 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Use the "prefer-dynamic" feature of llvm-sys or build your own copy of LLVM (you could also try the prebuilt one from llvm.org).
Comment by Toolybird (Toolybird) - Wednesday, 30 August 2023, 23:03 GMT
> I'm working on a compiler

Not a common use case :) Please see previous discussion in  FS#77644  and also see PM's comment here [1]. You might need to compile your own custom/AUR LLVM as hinted at in the llvm-sys doc.

[1] https://bugs.archlinux.org/task/77691#comment216584
Comment by Evangelos Foutras (foutrelis) - Wednesday, 30 August 2023, 23:37 GMT
Adding to what Toolybird said, llvm-sys supports linking to the dynamic LLVM library if you enable the "prefer-dynamic" feature.

Loading...