# Maintainer: George Rawlinson # Contributor: Adrian Perez de Castro pkgname=mold pkgver=1.5.1 pkgrel=101 pkgdesc='A Modern Linker' arch=(aarch64 'x86_64') url="https://github.com/rui314/mold" license=('AGPL3') depends=('gcc-libs' 'mimalloc' 'openssl' 'zlib' 'tbb' 'xxhash') makedepends=('git') checkdepends=('libdwarf') options=('strip' '!lto') source=("${url}/archive/refs/tags/v${pkgver}.tar.gz") b2sums=('1a5f8099df3cf7a6008632afed2aa106a54fa0c6628302f13586884fd1a37705a2bfc9ddc395261c04d53fe9de679b5afc7e052dcfe37894444b024670f44307') prepare() { cd "$pkgname"-"$pkgver" # use /usr/lib instead of /usr/libexec sed -i "s/libexec/lib/" Makefile } build() { make -j2 \ -C "$pkgname"-"$pkgver" \ PREFIX=/usr \ LTO=0 \ SYSTEM_MIMALLOC=1 \ SYSTEM_TBB=1 \ SYSTEM_XXHASH=1 } check() { cd "$pkgname"-"$pkgver" make \ PREFIX=/usr \ LTO=0 \ SYSTEM_MIMALLOC=1 \ SYSTEM_TBB=1 \ SYSTEM_XXHASH=1 \ check } package() { make \ -C "$pkgname"-"$pkgver" \ PREFIX=/usr \ LTO=0 \ SYSTEM_MIMALLOC=1 \ SYSTEM_TBB=1 \ SYSTEM_XXHASH=1 \ DESTDIR="$pkgdir" \ install }