summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2021-01-09 15:34:38 +0000
committerDaniel Bermond2021-01-09 15:34:38 +0000
commitb0f727fa0411f3cfd8d76ac3be5d83b1b4567376 (patch)
tree613fff773295f1b873388161c677015df5c4f55e
parente0a5e6addec5178518822451d2075dde6f271fb5 (diff)
downloadaur-b0f727fa0411f3cfd8d76ac3be5d83b1b4567376.tar.gz
Fix build
At the time of writing, it does not build with the current versions of system llvm/clang/spirv-llvm-translator/intel-opencl-clang.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD47
2 files changed, 48 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f9dbb694c7d2..ac1db272a88a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,33 @@
pkgbase = intel-graphics-compiler-git
pkgdesc = Intel Graphics Compiler for OpenCL (git version)
- pkgver = 1.0.4361.r125.ga3bf2c5b
+ pkgver = 1.0.5964.r58.g51b88fca
pkgrel = 1
epoch = 1
url = https://github.com/intel/intel-graphics-compiler/
arch = x86_64
license = MIT
+ license = custom
makedepends = git
makedepends = cmake
- makedepends = clang
- makedepends = llvm
makedepends = python
- depends = llvm-libs
- depends = intel-opencl-clang
- depends = ncurses
+ depends = gcc-libs
depends = zlib
provides = intel-graphics-compiler
+ provides = spirv-llvm-translator
+ provides = intel-opencl-clang
conflicts = intel-graphics-compiler
+ conflicts = spirv-llvm-translator
+ conflicts = intel-opencl-clang
options = !emptydirs
source = git+https://github.com/intel/intel-graphics-compiler.git
source = git+https://github.com/intel/vc-intrinsics.git
- source = git+https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
+ source = git+https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git#branch=llvm_release_100
+ source = git+https://github.com/intel/opencl-clang.git#branch=ocl-open-100
+ source = git+https://github.com/llvm/llvm-project.git#tag=llvmorg-10.0.0
+ source = git+https://github.com/intel/llvm-patches.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index d0d452870af0..552259bfabc7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,65 @@
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=intel-graphics-compiler-git
-pkgver=1.0.4361.r125.ga3bf2c5b
+pkgver=1.0.5964.r58.g51b88fca
pkgrel=1
epoch=1
pkgdesc='Intel Graphics Compiler for OpenCL (git version)'
arch=('x86_64')
url='https://github.com/intel/intel-graphics-compiler/'
-license=('MIT')
-depends=('llvm-libs' 'intel-opencl-clang' 'ncurses' 'zlib')
-makedepends=('git' 'cmake' 'clang' 'llvm' 'python')
-provides=('intel-graphics-compiler')
-conflicts=('intel-graphics-compiler')
+license=('MIT' 'custom')
+depends=('gcc-libs' 'zlib')
+makedepends=('git' 'cmake' 'python')
+provides=('intel-graphics-compiler' 'spirv-llvm-translator' 'intel-opencl-clang')
+conflicts=('intel-graphics-compiler' 'spirv-llvm-translator' 'intel-opencl-clang')
options=('!emptydirs')
source=('git+https://github.com/intel/intel-graphics-compiler.git'
'git+https://github.com/intel/vc-intrinsics.git'
- 'git+https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git')
+ 'git+https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git#branch=llvm_release_100'
+ 'git+https://github.com/intel/opencl-clang.git#branch=ocl-open-100'
+ 'git+https://github.com/llvm/llvm-project.git#tag=llvmorg-10.0.0'
+ 'git+https://github.com/intel/llvm-patches.git')
sha256sums=('SKIP'
'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
'SKIP')
+prepare() {
+ ln -sf intel-graphics-compiler igc
+ ln -sf ../../../SPIRV-LLVM-Translator llvm-project/llvm/projects/llvm-spirv
+ ln -sf ../../../opencl-clang llvm-project/llvm/projects/opencl-clang
+ ln -sf llvm-patches llvm_patches
+}
+
pkgver() {
git -C intel-graphics-compiler describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^igc\.//'
}
build() {
- cmake -B build -S intel-graphics-compiler \
+ cmake -B build -S igc \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DIGC_OPTION__ARCHITECTURE_TARGET='Linux64' \
- -DIGC_PREFERRED_LLVM_VERSION='10.0.1' \
- -DVC_INTRINSICS_SRC="${srcdir}/vc-intrinsics" \
- -DSPIRV_SRC="${srcdir}/SPIRV-LLVM-Translator" \
-DINSTALL_GENX_IR='ON' \
+ -DCCLANG_FROM_SYSTEM='OFF' \
-Wno-dev
make -C build
}
package() {
- make -C build DESTDIR="$pkgdir" install
- install -D -m644 intel-graphics-compiler/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ make -C build DESTDIR="${pkgdir}" install
+ install -D -m644 igc/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ mv "${pkgdir}/usr/include"/opencl-c{,-base}.h "${pkgdir}/usr/include/igc"
mv "${pkgdir}/usr/lib/igc/NOTICES.txt" "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # additional files for spirv-llvm-translator and opencl-clang
+ cp -dr --no-preserve='ownership' build/IGC/VectorCompiler/spirv-install/include/LLVMSPIRVLib "${pkgdir}/usr/include"
+ install -D -m644 build/IGC/VectorCompiler/spirv-install/lib/libSPIRVDLL.so -t "${pkgdir}/usr/lib"
+ install -D -m644 build/IGC/VectorCompiler/spirv-install/lib/pkgconfig/*.pc -t "${pkgdir}/usr/lib/pkgconfig"
+ install -D -m644 build/IGC/llvm/src/llvm/projects/opencl-clang/common_clang.h -t "${pkgdir}/usr/include/cclang"
+ install -D -m644 SPIRV-LLVM-Translator/LICENSE.TXT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-spirv-llvm-translator"
+ install -D -m644 opencl-clang/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-opencl-clang"
+ sed -i 's|\(prefix=\).*|\1/usr|' "${pkgdir}/usr/lib/pkgconfig/LLVMSPIRVLib.pc"
}