Skip to content

Commit

Permalink
Build: Default to use the lld linker in LLVM-included builds
Browse files Browse the repository at this point in the history
* build/unix/release-with-batteries.sh: When building LLVM, set the
  LLVM_ENABLE_LLD and CLANG_DEFAULT_LINKER=lld options.
  • Loading branch information
housel committed Jan 4, 2025
1 parent 419c6b9 commit 51151cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/unix/release-with-batteries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ NEED_LIBUNWIND=:
NEED_INSTALL_NAME=false
SYSROOT=
USE_LLD="-fuse-ld=lld"
USE_LLD_OPTS="-DLLVM_ENABLE_LLD:BOOL=ON -DCLANG_DEFAULT_LINKER=lld"
BUILD_SRC=false
case ${MACHINE}-${SYSTEM} in
amd64-FreeBSD)
Expand Down Expand Up @@ -61,6 +62,7 @@ case ${MACHINE}-${SYSTEM} in
NEED_INSTALL_NAME=:
SYSROOT=" -isysroot $(xcrun --show-sdk-path)"
USE_LLD=
USE_LLD_OPTS=
DYLAN_JOBS=$(getconf _NPROCESSORS_ONLN)
;;
esac
Expand Down Expand Up @@ -89,7 +91,7 @@ fi
-DCMAKE_INSTALL_PREFIX=${DISTDIR}/llvm \
-DLLVM_TARGETS_TO_BUILD:STRING="Native" \
-DLLVM_ENABLE_PROJECTS="llvm;clang;lld" \
${RT_OPTS} \
${RT_OPTS} ${USE_LLD_OPTS} \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBEDIT=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
Expand Down

0 comments on commit 51151cc

Please sign in to comment.