aboutsummaryrefslogblamecommitdiffstats
path: root/community/lld/APKBUILD
blob: bd110ef95a5508d75aaeb49acb00b85f8a35413c (plain) (tree)
1
2
3
4
5
6
7
8
9
                                              


                                               

            
                      
                         
                      
          
              

             



                                  
                 

                                          
                                                                      






                                       
                                               
                                              
                                                           
                                                                            
                                                                     
                                             
                                               
                                       



            
                            





                                                                         
                                                      



                                                                                     
 







                                      
                                                                                                                                                                   
# Contributor: Eric Molitor <eric@molitor.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lld
pkgver=8.0.0
pkgrel=0
_llvmver=${pkgver%%.*}
pkgdesc="The LLVM Linker"
url="https://llvm.org"
arch="all"
license="NCSA"
makedepends="
	cmake
	libedit-dev
	llvm-dev>=$_llvmver
	llvm-static>=$_llvmver
	llvm-test-utils=>$_llvmver
	zlib-dev"
checkdepends="gtest gtest-dev bash"
subpackages="$pkgname-static $pkgname-dev"
source="https://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz"
builddir="$srcdir/$pkgname-$pkgver.src"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build

	cmake .. \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_VERBOSE_MAKEFILE=OFF \
		-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
		-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS -fpermissive" \
		-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_INSTALL_RPATH=ON \
		-DLLVM_INCLUDE_TESTS=ON
	make
}

check() {
	cd "$builddir/build"

	# ELF/eh-frame-hdr-augmentation.s is broken on armhf & armv7
	case "$CARCH" in
		armhf|armv7) rm ../test/ELF/eh-frame-hdr-augmentation.s;;
	esac

	# make check-lld doesn't like using system lit
	lit -sv \
		--param lld_site_config=$builddir/build/test/lit.site.cfg \
		--param lld_unit_site_config=$builddir/build/test/Unit/lit.site.cfg \
		$builddir/build/test

}

package() {
	cd "$builddir"/build

	make install DESTDIR="$pkgdir"
}

sha512sums="43b671546f26a2293c27496584fcae43a99caabfffdbc7f72e06689e489005215b9a8607a4dc66a5469b3139d362486a46d1fbbdc2c657195fd3d3f1a72d2fa0  lld-8.0.0.src.tar.xz"