2020-05-09 14:12:42 +02:00
|
|
|
# Description: Linker from the LLVM project
|
2021-06-16 10:29:27 +02:00
|
|
|
# URL: https://lld.llvm.org/
|
2020-05-09 14:12:42 +02:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
|
|
# Depends on: llvm
|
|
|
|
|
|
|
|
name=lld
|
2022-04-27 11:50:14 +02:00
|
|
|
version=14.0.2
|
2022-02-05 12:42:30 +01:00
|
|
|
release=1
|
2021-10-01 10:36:04 +02:00
|
|
|
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/lld-$version.src.tar.xz
|
2021-05-08 05:38:35 +02:00
|
|
|
0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch)
|
2020-05-09 14:12:42 +02:00
|
|
|
|
|
|
|
build() {
|
2021-05-08 05:38:35 +02:00
|
|
|
patch -d $name-$version.src -p2 -i $SRC/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
|
|
|
|
|
|
|
|
cmake -S $name-$version.src -B build -G Ninja \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2021-08-30 12:59:12 +02:00
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
2021-12-11 13:40:37 +01:00
|
|
|
-D LLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF;NVPTX;WebAssembly' \
|
2021-05-08 05:38:35 +02:00
|
|
|
-D LLVM_LINK_LLVM_DYLIB=ON \
|
|
|
|
-D LLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
|
2020-05-09 14:12:42 +02:00
|
|
|
-Wno-dev
|
|
|
|
|
|
|
|
cmake --build build
|
2020-07-08 15:14:57 +02:00
|
|
|
DESTDIR=$PKG cmake --install build
|
2020-05-09 14:12:42 +02:00
|
|
|
}
|