summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6ef6735997867a8240a74a8e21db0c6d83ceafd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pkgname=mold-git
pkgver=v1.0.1_11_g4ccbd24c
pkgrel=1
pkgdesc="A Modern Linker"
arch=(x86_64)
url="https://github.com/rui314/mold"
license=("AGPL3")
depends=("gcc-libs" "mimalloc" "openssl" "tbb" "zlib")
makedepends=("clang" "git" "xxhash")
source=("mold::git+https://github.com/rui314/mold")
sha256sums=("SKIP")
reponame="mold"
MKFLAGS=" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1"

prepare() {
	cd "$reponame"
	sed -i "s/libexec/lib/" Makefile
}

pkgver() {
	cd "$reponame"
	git describe --long --tags | sed "s/-/_/g"
}

build() {
	make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1 -j `nproc`
}

package() {
	make -C "${reponame}" PREFIX=/usr LTO=1 SYSTEM_MIMALLOC=1 SYSTEM_TBB=1 SYSTEM_XXHASH=1 DESTDIR="${pkgdir}" install
}