FS#76365 - [llvm] Consider enabling BOLT

Attached to Project: Arch Linux
Opened by Laurențiu Nicola (lnicola) - Tuesday, 01 November 2022, 06:55 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:25 GMT
Task Type Feature Request
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 2
Private No

Details

Description:
As far as I can tell, BOLT should be available in LLVM 14, but I don't think it's compiled in on Arch (`llvm-bolt` and `merge-fdata` are missing). Could you enable them? See https://github.com/llvm/llvm-project/tree/main/bolt#manual-build.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:25 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/llvm/issues/1
Comment by Laurențiu Nicola (lnicola) - Tuesday, 01 November 2022, 06:55 GMT
Sorry, I filed this as a bug by mistake.
Comment by Toolybird (Toolybird) - Wednesday, 02 November 2022, 03:18 GMT
Not sure about this...but found some BOLT mentions here [1]

[1] https://aur.archlinux.org/packages/makepkg-optimize-mold
Comment by Peter Jung (ptr1337) - Friday, 04 November 2022, 13:17 GMT
Actually compiling BOLT into a DYLIB llvm does not work correctly. I have tested it with llvm 14 and it did not worked.
Here the open bug report this:
https://github.com/llvm/llvm-project/issues/57551

I have not tested if llvm 15 works, im waiting currently until arch will upgrade to 15 to test this.
This commit does maybe fix that, but will still not link with libLLVM.so:
https://github.com/llvm/llvm-project/commit/61cff9079c083fdcfb9fa324e50b9e480165037e

The above linked package, is just a little helper for the usage of makepkg.
Comment by Peter Jung (ptr1337) - Monday, 19 December 2022, 13:17 GMT
I have tried a bit to include llvm-bolt into llvm 15.
It worked so far, I needed to use some patches from fedora to make it proper compiling, because of the above mentioned DYLIB issue.
Besides that llvm would require to build from source, since llvm-bolt has no release which could be included into the source array.
BOLT will have a own release with llvm 16 so far I followed in their discord.

If SPHINX is used, it also require this patch to have no error at the compilation:
https://reviews.llvm.org/D140156
Comment by Peter Jung (ptr1337) - Saturday, 31 December 2022, 20:13 GMT
I managed it to build it into the PKGBUILD from arch. It gets actually compiled from the git repo, since llvm-bolt got not packaged with the release of llvm 15.
According to the llvm-bolt discord channel it will be packaged with llvm 16.
https://github.com/ptr1337/llvm-pkgbuilds/blob/master/llvm%2Bbolt/PKGBUILD
Comment by Peter Jung (ptr1337) - Sunday, 12 February 2023, 10:18 GMT
I have send a PR to LLVM, so that BOLT will have a tarball release. This will be cherry picked to llvm 16.
https://reviews.llvm.org/D143809
Comment by Peter Jung (ptr1337) - Wednesday, 31 May 2023, 15:31 GMT
https://github.com/llvm/llvm-project/commit/9d0a2a41081ba3f02cc97d6d763be9916550bb7a

So a recent fix for the install did also land now into the 16.x branch, it should be possible to package BOLT now proper for archlinux.
Comment by Peter Jung (ptr1337) - Wednesday, 30 August 2023, 18:36 GMT
Is there any progress with llvm 16?
Does arch plan to ship llvm-bolt maybe in a own package?

Loading...