community/ldc to 1.30.0-2

This commit is contained in:
Kevin Mihelich 2023-01-18 12:18:08 +00:00
parent 35bd8543c0
commit a1b2d8f750

View file

@ -15,12 +15,12 @@ _pkgcommit=32f5a359dd9030b2dc667e1e7823a1b765496cac
_dversion=2.100.1
_clangversion=14.0.6 # related to where ldc2 looks for compiler-rt sanitizers
epoch=3
pkgrel=1
pkgrel=2
pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runtime and libphobos2"
arch=('x86_64')
url="https://github.com/ldc-developers/ldc"
license=('BSD')
makedepends=('git' 'cmake' 'llvm' 'ldc' 'ninja')
makedepends=('git' 'cmake' 'llvm14' 'ldc' 'ninja')
# Disable lto as linking the ldc2 binary fails
options=(!lto)
@ -43,7 +43,7 @@ prepare() {
git config submodule.druntime.url "$srcdir/ldc-druntime"
git config submodule.phobos.url "$srcdir/ldc-phobos"
git config submodule.tests/d2/dmd-testsuite.url "$srcdir/ldc-testsuite"
git submodule update
git -c protocol.file.allow=always submodule update
# Set version used for path construction in getFullClangCompilerRTLibPath()
sed -i "s/ldc::llvm_version_base/\"$_clangversion\"/" driver/linker-gcc.cpp
@ -65,6 +65,7 @@ build() {
-DLDC_WITH_LLD=OFF \
-DD_COMPILER_FLAGS="-link-defaultlib-shared=false" \
-DADDITIONAL_DEFAULT_LDC_SWITCHES="\"-link-defaultlib-shared\"" \
-DCMAKE_PREFIX_PATH=/usr/lib/llvm14 \
..
ninja -j2
}
@ -75,7 +76,7 @@ check() {
}
package_ldc() {
depends=('liblphobos' 'llvm-libs' 'gcc' 'compiler-rt')
depends=('liblphobos' 'llvm14-libs' 'gcc' 'compiler-rt14')
backup=('etc/ldc2.conf')
provides=("d-compiler=$_dversion")