summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackalope2021-09-23 08:54:17 -0500
committerJackalope2021-09-23 08:54:17 -0500
commit19f5ac55137468b744138e07c15a4d45f20bc39d (patch)
treea24f9d07412eaec1084f94c260f8da8dbdae1b34
parentd9bcf1a008dc718a562010d224407477c960b28e (diff)
downloadaur-19f5ac55137468b744138e07c15a4d45f20bc39d.tar.gz
Fix wrapper library
-rw-r--r--PKGBUILD10
1 files changed, 7 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7ec6f0451f31..87e9946b58d5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ pkgdesc="Fast linker"
arch=(x86_64)
url="https://github.com/rui314/mold"
license=("unknown")
-depends=(gcc-libs openssl zlib)
+depends=(xxhash mimalloc gcc-libs openssl zlib)
makedepends=(clang cmake git)
source=("mold::git+https://github.com/rui314/mold")
sha256sums=("SKIP")
@@ -18,9 +18,13 @@ pkgver() {
build() {
cd $reponame
- make
+ make -C "${srcdir}/${reponame}" -j "$(nproc)" LTO=1 SYSTEM_MIMALLOC=1
}
package() {
- install -Dm755 $srcdir/mold/mold "$pkgdir/usr/bin/mold"
+ cd $reponame
+ make -C "${srcdir}/${reponame}" LTO=1 SYSTEM_MIMALLOC=1 DESTDIR="${pkgdir}" install
+ ln -snf mold "${pkgdir}/usr/bin/ld.mold"
+ # Mold checks for the lib alongside itself, which is rather silly
+ cp "${pkgdir}/usr/lib/mold/mold-wrapper.so" "${pkgdir}/usr/bin"
}