2020-05-09 22:12:42 +10:00
|
|
|
# Description: Linker from the LLVM project
|
2021-06-16 18:29:27 +10:00
|
|
|
# URL: https://lld.llvm.org/
|
2023-08-27 17:31:27 +02:00
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2020-05-09 22:12:42 +10:00
|
|
|
# Depends on: llvm
|
|
|
|
|
|
|
|
name=lld
|
2024-04-04 17:47:21 +02:00
|
|
|
version=18.1.3
|
2022-02-05 12:42:30 +01:00
|
|
|
release=1
|
2021-10-01 18:36:04 +10:00
|
|
|
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/lld-$version.src.tar.xz
|
2023-08-27 17:31:27 +02:00
|
|
|
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/cmake-$version.src.tar.xz
|
|
|
|
0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch)
|
2020-05-09 22:12:42 +10:00
|
|
|
|
|
|
|
build() {
|
2023-08-27 17:31:27 +02:00
|
|
|
patch -d $name-$version.src -p2 -i $SRC/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
|
2021-05-08 13:38:35 +10:00
|
|
|
|
2023-08-27 17:31:27 +02:00
|
|
|
mv cmake-$version.src cmake
|
2022-09-23 07:54:24 +02:00
|
|
|
|
2023-08-27 17:31:27 +02:00
|
|
|
cmake -S $name-$version.src -B build -G Ninja \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D LLVM_LINK_LLVM_DYLIB=ON \
|
|
|
|
-D LLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
|
|
|
|
-Wno-dev
|
2020-05-09 22:12:42 +10:00
|
|
|
|
2023-08-27 17:31:27 +02:00
|
|
|
cmake --build build
|
|
|
|
DESTDIR=$PKG cmake --install build
|
2020-05-09 22:12:42 +10:00
|
|
|
}
|