summaryrefslogtreecommitdiff
path: root/repo/devel/lld/lld.xibuild
blob: c2dff7f4c9fddba75f92a6bb7b0a3774e31a6466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

NAME="lld"
DESC="The LLVM Linker"

MAKEDEPS="cmake llvm-libunwind"
DEPS="musl llvm "

PKG_VER=13.0.0
SOURCE="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/lld-$PKG_VER.src.tar.xz"

build () {
    cmake -B build \
        -DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_VERBOSE_MAKEFILE=OFF \
		-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
		-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
		-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS -Wl,-z,stack-size=2097152" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_INSTALL_RPATH=ON \
		-DLLVM_INCLUDE_TESTS=ON \
		-DLLVM_EXTERNAL_LIT=/usr/bin/lit 
	cmake --build build
}

package () {
	DESTDIR="$PKG_DEST" cmake --install build
    install -Dm 644 docs/ld.lld.1 $PKG_DEST/usr/share/man/man1/
}