diff options
author | Sergey A. | 2024-03-08 21:04:52 +0300 |
---|---|---|
committer | Sergey A. | 2024-03-08 21:04:52 +0300 |
commit | 801515df598f30c8c91ea453381cc34112ee2844 (patch) | |
tree | be0dd9299e5a38c75e1d57ba19b7cb7fe5dbc78f | |
parent | a1ec6ddce7ca61cf7fa7f7f21d486a7f87df7c3a (diff) | |
download | aur-801515df598f30c8c91ea453381cc34112ee2844.tar.gz |
chore: set RUSTFLAGS to use clang/mold for linking
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 |
2 files changed, 12 insertions, 3 deletions
@@ -1,7 +1,7 @@ pkgbase = aichat pkgdesc = OpenAI, ChatGPT, ollama and more in your terminal pkgver = 0.14.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/sigoden/aichat arch = i686 arch = x86_64 @@ -9,6 +9,8 @@ pkgbase = aichat license = MIT license = APACHE makedepends = cargo + makedepends = clang + makedepends = mold depends = gcc-libs conflicts = aichat-bin conflicts = aichat-git @@ -2,13 +2,13 @@ pkgname=aichat pkgver=0.14.0 -pkgrel=1 +pkgrel=2 pkgdesc="OpenAI, ChatGPT, ollama and more in your terminal" arch=('i686' 'x86_64' 'aarch64') url="https://github.com/sigoden/aichat" license=('MIT' 'APACHE') depends=('gcc-libs') -makedepends=('cargo') +makedepends=('cargo' 'clang' 'mold') conflicts=('aichat-bin' 'aichat-git') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('de554ef95d75a17b20f384b5f2ea07b3d2cd6112e87e9e038145d13285633468') @@ -28,6 +28,13 @@ build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target + # https://github.com/rui314/mold?tab=readme-ov-file#how-to-use + export RUSTFLAGS="${RUSTFLAGS} \ + -C linker=clang \ + -C link-arg=-flto \ + -C linker-plugin-lto \ + -C link-arg=-fuse-ld=lld" + cargo build --release --frozen } |