blob: 35482aec38eeef414c8497551395c4894e4e90e9 (
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=15.0.3
8 release=1
9 source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/lld-$version.src.tar.xz
10 https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/cmake-$version.src.tar.xz
11 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch)
12
13 build() {
14 patch -d $name-$version.src -p2 -i $SRC/0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
15
16 cp -r $SRC/cmake-$version.src/Modules/* $name-$version.src/cmake/modules/.
17
18 cmake -S $name-$version.src -B build -G Ninja \
19 -D CMAKE_INSTALL_PREFIX=/usr \
20 -D CMAKE_BUILD_TYPE=Release \
21 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
22 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
23 -D LLVM_LINK_LLVM_DYLIB=ON \
24 -D LLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
25 -Wno-dev
26
27 cmake --build build
28 DESTDIR=$PKG cmake --install build
29 }
|