devel/intel-graphics-compiler: add llvm12 (beta) flavor

https://github.com/intel/intel-graphics-compiler/projects/2
This commit is contained in:
Jan Beich 2021-08-11 20:09:42 +00:00
parent 3f6bad5564
commit 070200f935
3 changed files with 37 additions and 5 deletions

View File

@ -2,6 +2,7 @@ PORTNAME= intel-graphics-compiler
DISTVERSIONPREFIX= igc-
DISTVERSION= 1.0.8744
CATEGORIES= devel
PKGNAMESUFFIX= -${FLAVOR}
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Intel Graphics Compiler for OpenCL
@ -12,16 +13,20 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported
BUILD_DEPENDS= vc-intrinsics-llvm11>=s20210730:devel/vc-intrinsics@llvm11
LIB_DEPENDS= libopencl-clang.so.11:devel/opencl-clang@llvm11
BUILD_DEPENDS= vc-intrinsics-${FLAVOR}>=s20210730:devel/vc-intrinsics@${FLAVOR}
LIB_DEPENDS= libopencl-clang.so.${FLAVOR:S/llvm//}:devel/opencl-clang@${FLAVOR}
FLAVORS= ${12 11:L:S/^/llvm/}
CONFLICTS_INSTALL= ${PORTNAME}-*
USES= bison cmake compiler:c++17-lang python:build
USE_GITHUB= yes
USE_LDCONFIG= yes
GH_ACCOUNT= intel
CMAKE_OFF= INSTALL_SPIRVDLL
CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${LIB_DEPENDS:M*@llvm*:C/.*@//}" \
-DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${LIB_DEPENDS:M*@llvm*:C/.*so\.//:C/:.*//}"
CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${FLAVOR}" \
-DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${FLAVOR:S/llvm//}"
CFLAGS+= -Wno-macro-redefined # __fastcall
PLIST_SUB= ARCH_SUFX=${ARCH:S/i386/32/:S/amd//:S/x86_//}

View File

@ -0,0 +1,22 @@
CMake Error at external/llvm/llvm_deps.cmake:50 (file):
file COPY cannot find
"IGC/DEFAULT_IGC_LLVM_SOURCES_DIR-NOTFOUND/libunwind/include/mach-o/compact_unwind_encoding.h":
No such file or directory.
Call Stack (most recent call first):
IGC/CMakeLists.txt:1250 (include)
--- external/llvm/llvm_deps.cmake.orig 2021-09-16 08:50:38 UTC
+++ external/llvm/llvm_deps.cmake
@@ -44,12 +44,6 @@ include(llvm_spirv_source_hook)
# LLD source hook.
if(IGC_OPTION__LLVM_LLD)
include(llvm_lld_source_hook)
- if(NOT EXISTS "${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o" AND ${IGC_OPTION__LLVM_PREFERRED_VERSION} GREATER_EQUAL "12.0.0")
- # Need to copy one header from unwind package for LLD (only for building from sources)
- file(MAKE_DIRECTORY ${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o)
- file(COPY ${DEFAULT_IGC_LLVM_SOURCES_DIR}/libunwind/include/mach-o/compact_unwind_encoding.h
- DESTINATION ${IGC_LLVM_WORKSPACE_SRC}/libunwind/include/mach-o/)
- endif()
endif()
# Process LLVM.

View File

@ -2,6 +2,7 @@ PORTNAME= compute-runtime
DISTVERSION= 21.37.20939
CATEGORIES= lang
PKGNAMEPREFIX= intel-
PKGNAMESUFFIX= -${FLAVOR}
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= aa5a39a2db79.patch:-p1 # https://github.com/intel/compute-runtime/pull/361
@ -15,9 +16,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md
ONLY_FOR_ARCHS= amd64 i386
ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported
LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler \
LIB_DEPENDS= libigc.so:devel/intel-graphics-compiler@${FLAVOR} \
libigdgmm.so:multimedia/gmmlib
FLAVORS= ${12 11:L:S/^/llvm/}
CONFLICTS_INSTALL= ${PORTNAME}-*
USES= cmake compiler:c++17-lang localbase:ldflags pkgconfig
USE_GITHUB= yes
USE_LDCONFIG= yes