FS#77644 - [llvm] Consider dropping some targets -
Attached to Project:
Arch Linux
Opened by Emil (xexaxo) - Saturday, 25 February 2023, 16:47 GMT
Last edited by Evangelos Foutras (foutrelis) - Sunday, 26 February 2023, 16:08 GMT
Opened by Emil (xexaxo) - Saturday, 25 February 2023, 16:47 GMT
Last edited by Evangelos Foutras (foutrelis) - Sunday, 26 February 2023, 16:08 GMT
|
Details
Description:
Disclaimer: I've opened similar Fast forward a few years, currently we have: $ llvm-config --version 15.0.7 $ llvm-config --targets-built AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ VE WebAssembly X86 XCore $ pacman -Qi llvm llvm-libs | grep -E "Name|Size" Name : llvm Installed Size : 390.33 MiB Name : llvm-libs Installed Size : 120.49 MiB LLVM gained 5 new targets and packages grew by a factor of 3. Overall I agree with the original reply - people use these for cross-compilation. Off the top of my head, I cannot see (m)any users for Mips MSP430 PowerPC Sparc SystemZ XCore, so I would request dropping them fully or in part. Note the goal here is to do some "string cleaning" and drop the dead weight, while not breaking people's workflows (not intentionally at least). So if someone comes forward, saying hey "I'm using XCore" let's keep that. Thanks Additional info: * package version(s) llvm 15.0.7 |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Sunday, 26 February 2023, 16:08 GMT
Reason for closing: None
Additional comments about closing: As discussed, I'm keeping all targets enabled but have removed the llvm-exegesis tool and most static libs from the llvm package.
Sunday, 26 February 2023, 16:08 GMT
Reason for closing: None
Additional comments about closing: As discussed, I'm keeping all targets enabled but have removed the llvm-exegesis tool and most static libs from the llvm package.
In particular - llvm gets pulled every time an app uses Mesa GL/vdpau/vdpau, even if you're _not_ using an AMD GPU.
The above proposal should cut 20-25M off llvm itself, just like llvm-libs is a bit over 5%. Perhaps too modest.
Looking around we have:
- /usr/bin/ 46M, of which
++ 31M llvm-exegesis
Seems to be static linking LLVM as per https://github.com/llvm/llvm-project/commit/1ad5e3cd6b8147d6919a2dbee9b905f86ba50c97. Trying literally every example from the manual (+ some more from the llvm tests) errors out with "benchmarking unavailable, LLVM was built without libpfm".
- /usr/include 25M
Nothing stands out
- /usr/lib/ 270M, of which
++ 104M libLLVM*CodeGen.a - CodeGen frontend + per target ones
targets larger than 5M - llbLLVMfoobar*.a
++ 30M AMDGPU
++ 18M X86
++ 15M AArch64
++ 12M ARM
++ 6.5M Mips
- /usr/share/docs/llvm/ 38M, of which
++ 16M html/AMDGPU
Building on the original idea, one could
- drop the targets originally proposed - 5%
- drop llvm-exegesis - 5%
- split AMDGPU into sub package - 10%
Ideally there is some clever trick we could use, until then these seem reasonable IMHO.
Dropping the proposed targets for 8M smaller libLLVM doesn't seem worth it to me. Dropping llvm-exegesis might be fine (because, based on your findings, it doesn't do much without libpfm).
A bigger win could come from not shipping static libraries in the llvm package. Gentoo appears to keep the LLVMDemangle, LLVMSupport and LLVMTableGen ones (for clang-tblgen it seems).
In general, please avoid spending too much time on size reduction proposals because, as you might have guessed from
FS#72588, I'm not very fast to act on them. Sorry about that. :3To recap:
- 8M smaller libLLVM is a non-goal for me
- llvm-exegesis could likely be dropped
- I should look into dropping most static libs from llvm
- I definitely need to take a closer look at
FS#72588Thank you