blob: 28f89b5f07cbdbbbc256187e6561c477ba46fb2d (
plain)
1 # Description: Linker from the LLVM project
2 # URL: https://lld.llvm.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: llvm
5
6 name=lld
7 version=13.0.1
8 release=1
9 source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/lld-$version.src.tar.xz
10 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch)
11
12 build() {
13 patch -d $name-$version.src -p2 -i $SRC/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
14
15 cmake -S $name-$version.src -B build -G Ninja \
16 -D CMAKE_INSTALL_PREFIX=/usr \
17 -D CMAKE_BUILD_TYPE=Release \
18 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
19 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
20 -D LLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF;NVPTX;WebAssembly' \
21 -D LLVM_LINK_LLVM_DYLIB=ON \
22 -D LLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
23 -Wno-dev
24
25 cmake --build build
26 DESTDIR=$PKG cmake --install build
27 }
|