Build AUR packages with clang and ThinLTO by default
aurb now builds with clang + lld + ThinLTO and bind-mounts a ThinLTO cache and its clang.cfg into the chroot; --gcc keeps the old gcc build. update-kernel still uses gcc.
This commit is contained in:
@@ -166,4 +166,14 @@ SRCEXT='.src.tar.gz'
|
||||
#-- Command used to run pacman as root, instead of trying sudo and su
|
||||
#PACMAN_AUTH=()
|
||||
export CCACHE_DIR=/home/fuxino/.cache/ccache
|
||||
|
||||
# clang + lld + ThinLTO, only when aurb prepends AURB_CLANG=1 (its default; `aurb --gcc` doesn't).
|
||||
# update-kernel uses this file as is, so the kernels stay on gcc. Linker flags live in clang.cfg
|
||||
# (lld + ThinLTO cache); aurb bind-mounts its dir and the ThinLTO cache dir.
|
||||
if [[ -n ${AURB_CLANG-} ]]; then
|
||||
export CC="clang --config=/home/fuxino/.config/aurb/clang.cfg"
|
||||
export CXX="clang++ --config=/home/fuxino/.config/aurb/clang.cfg"
|
||||
export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib
|
||||
LTOFLAGS="-flto=thin"
|
||||
fi
|
||||
# vim: set ft=sh ts=2 sw=2 et:
|
||||
|
||||
Reference in New Issue
Block a user