Package Details: makepkg-optimize-mold 29-1

Git Clone URL: https://aur.archlinux.org/makepkg-optimize-mold.git (read-only, click to copy)
Package Base: makepkg-optimize-mold
Description: Supplemental build and packaging optimizations for makepkg
Upstream URL: https://wiki.archlinux.org/index.php/Makepkg-optimize
Keywords: makepkg-optimize makepkg-tweaks mold
Licenses: GPL
Submitter: ptr1337
Maintainer: ptr1337
Last Packager: ptr1337
Votes: 0
Popularity: 0.000000
First Submitted: 2021-12-31 21:48 (UTC)
Last Updated: 2022-06-30 20:58 (UTC)

Dependencies (11)

Required by (0)

Sources (26)

Latest Comments

brikler commented on 2022-07-01 10:38 (UTC) (edited on 2022-07-03 07:51 (UTC) by brikler)

What do you think about the path: ~/.toolchain/llvm

thank you, i like it :)

perhaps jemalloc as optional dependence:

How to build

Be sure to have jemalloc installed, it is used to improve llvm-bolt's memory handling.

edit: to understand this https://github.com/ptr1337/llvm-bolt-scripts correct: after compilation with BUILDENV bolt and relocs, i must run this script with the option STAGE=1and compile again?

edit2: wrong path in your bolt-scripts: TOPLEV=~/toolchain/llvm

ptr1337 commented on 2022-06-30 20:08 (UTC)

So, bolt should be correctly used now.

ptr1337 commented on 2022-06-30 19:05 (UTC)

@brikler Actually all are correct. These are just the verison's of llvm which where used for building. Actually I would go for the llvm-bolt-14 one, since it is the latest stable version. The -15 version is basically a build from the latest git commit, so does not mean to be stable.

I will sort out the server a bit with the llvm-bolt versions, I did some testing since at kernel building I found some issues but got them sorted out

What you mean how you can verify it ? You mean if clang where optimized by bolt ? Actually I let all time the optimized binary as default in called "clang-14" for example, then the original binary which is called "clang-14.org" and also add the profile (fdata) which where used to optimize the binary. So you can compare for example the compile time of each binary and see the performance difference and also some scripts which are helping in the usage of llvm-bolt.

Take a watch here for more infos about llvm-bolt:

https://github.com/ptr1337/llvm-bolt-scripts

Because the path: I saw the the export PATH command did somehow not correctly work. So I will soon push a new commit which fixes that when enabling options=(bolt).

What do you think about the path: ~/.toolchain/llvm ?

Regards.

brikler commented on 2022-06-30 14:58 (UTC) (edited on 2022-06-30 18:02 (UTC) by brikler)

@ptr1337

1) there are 3 llvm-bolt packages: llvm-bolt.tar.zst, llvm-bolt-13.tar.zst, llvm-bolt-14.tar.zst, and llvm-bolt-15.tar.zstwhat is the correct one?

2) i would prefer ~/toolchain/llvm-bolt as a hidden folder, because ~/ looks cleaner :) but for now, i will follow you

edit how can i verify if he package is optimized, or not?

ptr1337 commented on 2022-06-25 21:36 (UTC)

@blackout

Just saw myself and its now fixed. Im sorry, next time I should run shellcheck before.

Fixed!

blackout commented on 2022-06-25 18:29 (UTC) (edited on 2022-06-25 18:29 (UTC) by blackout)

@ptr1337 Thanks for your efforts. Today's update gives me

/usr/share/makepkg/buildenv/mold.sh: line 18: syntax error near unexpected token `;'
/usr/share/makepkg/buildenv/mold.sh: line 18: `    check_buildoption "mold" "y"; then;'

ptr1337 commented on 2022-06-25 07:12 (UTC)

@brikler

Sorry for late response. I did updated the patches, if you want to usea bolted toolchain place it to: ~/toolchain/llvm-bolt

You can find here prebolted llvm toolchains:

https://mirror.cachyos.org/

Simply download and extract it to there.

@blackout

fixed.

brikler commented on 2022-06-22 19:56 (UTC) (edited on 2022-06-23 06:10 (UTC) by brikler)

hi,

is this export correct? i ask, because it's your ~/

buildenv_bolt() {
  if
  check_buildoption "bolt" "y"; then
  export PATH="/home/ptr1337/Documents/llvm/bin:$PATH"
  fi
}

to save for you i little time, if it is stored in~/Documents:

buildenv_bolt() {
  if
  check_buildoption "bolt" "y"; then
  export PATH="/home/$USER/Documents/llvm/bin:$PATH"
  fi
}

i don't know if this export necessary, but there should be a hint imo

blackout commented on 2022-06-17 06:36 (UTC)

hash check fails for ldflags.conf ... FAILED

ptr1337 commented on 2022-04-29 14:44 (UTC)

@Koppajin

No, actually if compiling something with GCC you would need to have GCC-12(-git) or need to patch gcc11 and also compile it on your own first. If you compile something with llvm, you can simply enable it with removing at option from "!mold" to "mold".

You can also use simply your old makepkg.conf, and add at options mold, then its also enabled.

Here you can take a watch at my makepkg.conf:

https://github.com/ptr1337/dotfiles/blob/master/config/makepkg.conf#L116=

If you need gcc-git, its precompiled in the repo's which I provide, their you can also find all core and extra packages precompiled in x86-64-v3.

https://wiki.cachyos.org/en/home/Repo

Koppajin commented on 2022-04-26 10:28 (UTC)

Do I need to uncomment anything in the makepkg-optimize.conf or is it good to go? I noticed there are two extra CFLAGS lines that are commented out. (I'm a total noob btw, I know enough to get around) Is this package designed with a completely vanilla makepkg.conf file in mind? I had already tweaked mine tiny bit.

blackout commented on 2022-01-14 18:25 (UTC)

@ptr1337 tested with latest mold-git, works as expected. Thank you for your effort.

ptr1337 commented on 2022-01-12 06:24 (UTC)

@blackout

Sorry for the late response. The upcomming version of mold will have a fallback, as soon something would link with lto, to lld, ld.bfd. I think the next release will be soon, if using the git, you will face into no problems.

Checksums will be updated!

blackout commented on 2022-01-10 13:46 (UTC) (edited on 2022-01-10 13:46 (UTC) by blackout)

sha1sums block is wrong should be

sha1sums=(
  '81a662d3cf3e5fdbeb3c3e5d0b78efbacc6587d7'
  '1a4f26170da04998f9cba088a63a95fd75c1113e'
  '981eab856abb43c5e093620cdf4d8bfa2d690805'
  '67801619b39ea4542829a4b715034a9f7ac7cf2c'
  '4cd8012f8946761d7288a198af7edb3ebaf0ece0'
  '3c61762a183a2f76cc2ff2e55cfffb68b6a8320c'
  'efb3ed7d7d5516259709149d7bcd6ec208c07593'
  'd7a3801037333c582dba976db27cf8896bc1b401'
  'f17b1a8ccbd807fd59fbc716cc695be32e261e38'
  '9cb1a46ca7c3c6fab8a44ca5355528e9eb9e0650'
  '77b84f9ab5ecce37af2f4dce3b94bcfe54a87b00'
  '9270b5e33d4508a959688a10c20dec3732763937'
  '2efb74a7743764205d20e0dd74fb5f948673f825'
  '4c5f0be71638a6ec2f18c01675d99f19eb6dd45d'
  '1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90'
  '5d0cde13b50641371e4ec4d813d6b2dfae493889'
  '3a356f52131e39f59d360c54a572d678c7208b42'
  '34a33b47a8b667f9dc810737c0f598660b962d4c'
  '0dbba257ec59dc55583a74da0319d6c210cf717a'
  'a893c32f2a3fff8b279025ec60f0c3d88143dc1e'
  '4def44ef53ba3b579bed40af897d6f0c038ec78d'
  )

j1simon commented on 2022-01-09 17:35 (UTC)

...
fetching devel info...
==> Making package: makepkg-optimize-mold 21-1 (Sun Jan  9 18:34:01 2022)
==> Retrieving sources...
-> Found pgo.sh.in
-> Found graphite.sh.in
-> Found rice.sh.in
-> Found mold.sh.in
-> Found upx-exec.sh.in
-> Found optipng-exec.sh.in
-> Found svgo-exec.sh.in
-> Found upx.sh.in
-> Found optipng.sh.in
-> Found svgo.sh.in
-> Found cflags.conf
-> Found cxxflags.conf
-> Found makeflags.conf
-> Found ldflags.conf
-> Found debug-makeflags.conf
-> Found cmake-flags.conf
-> Found buildenv_ext.conf
-> Found destdirs_ext.conf
-> Found pkgopts_ext.conf
-> Found pkgopts-param_ext.conf
-> Found compress-param_max.conf
==> ERROR: Integrity checks (sha1) differ in size from the source array.
error: failed to download sources for 'makepkg-optimize-mold-21-1':
error: packages failed to build: makepkg-optimize-mold-21-1

blackout commented on 2022-01-03 00:40 (UTC) (edited on 2022-01-10 13:46 (UTC) by blackout)

@ptr1337 you should add -fno-lto to moldflags in mold.sh.in as long as LTO is not implemented in mold (https://github.com/rui314/mold/issues/181) this will disable LTO. Otherwise, builds will fail having LTO enabled per default (e.g. flashrom-git)

this should be sufficient

buildenv_mold() {
  if check_buildoption "mold" "y"; then
    CFLAGS+=" -fuse-ld=mold -fno-lto"
  fi
}