summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c129ce4be7279a255353740a7b712ca6a7910657 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Maintainer: Andreas Baumann <mail@andreasbaumann.cc>

pkgname=('llvm-mos-git')
_pkgname=${pkgname%-git}
pkgver=r452222.b05db96bef68
pkgrel=1
arch=('x86_64')
url="https://llvm-mos.org/wiki/Welcome"
license=('custom:Apache 2.0 with LLVM Exception')
makedepends=('cmake' 'ninja')
options=('staticlibs' '!lto') # Getting thousands of test failures with LTO
source=(git+https://github.com/llvm-mos/llvm-mos.git)
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$srcdir/$_pkgname"

  cmake \
    -S llvm \
    -G Ninja \
    -C clang/cmake/caches/MOS.cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/opt/llvm-mos \
  .

  ninja
}

check() {
  cd "$srcdir/$_pkgname"
  echo "No testing.. takes too long.."
}

package() {
  cd "$srcdir/$_pkgname"

  DESTDIR="$pkgdir" ninja install
}