git: 9b3e3e4b33ca - main - devel/spirv-llvm-translator: expose llvm-spirv program

Jan Beich jbeich at FreeBSD.org
Fri Jul 23 20:32:21 UTC 2021


The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b3e3e4b33ca983727d17b0a11676c8a460536fb

commit 9b3e3e4b33ca983727d17b0a11676c8a460536fb
Author:     Jan Beich <jbeich at FreeBSD.org>
AuthorDate: 2021-07-23 20:14:21 +0000
Commit:     Jan Beich <jbeich at FreeBSD.org>
CommitDate: 2021-07-23 20:32:00 +0000

    devel/spirv-llvm-translator: expose llvm-spirv program
    
    Required by libclc, see https://github.com/llvm/llvm-project/commit/c37145cab121
    
    Inspired by:    Arch, Fedora
---
 devel/spirv-llvm-translator/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/devel/spirv-llvm-translator/Makefile b/devel/spirv-llvm-translator/Makefile
index e8e8a77c77d1..9dfb30aa7abc 100644
--- a/devel/spirv-llvm-translator/Makefile
+++ b/devel/spirv-llvm-translator/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	spirv-llvm-translator
 DISTVERSIONPREFIX=	v
 DISTVERSION=	11.0.0
+PORTREVISION=	1
 CATEGORIES=	devel
 
 MAINTAINER=	jbeich at FreeBSD.org
@@ -16,12 +17,18 @@ USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 GH_ACCOUNT=	KhronosGroup
 GH_PROJECT=	SPIRV-LLVM-Translator
-CMAKE_ON=	BUILD_SHARED_LIBS
-PLIST_FILES=	include/LLVMSPIRVLib/LLVMSPIRVExtensions.inc \
+CMAKE_ON=	BUILD_SHARED_LIBS LLVM_BUILD_TOOLS
+PLIST_FILES=	bin/llvm-spirv \
+		include/LLVMSPIRVLib/LLVMSPIRVExtensions.inc \
 		include/LLVMSPIRVLib/LLVMSPIRVLib.h \
 		include/LLVMSPIRVLib/LLVMSPIRVOpts.h \
 		lib/libLLVMSPIRVLib.so \
 		lib/libLLVMSPIRVLib.so.${DISTVERSION:R:R} \
 		libdata/pkgconfig/LLVMSPIRVLib.pc
 
+.if exists(/usr/bin/ld.lld) && ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
+# undefined reference to `llvm::cfg::Update<llvm::BasicBlock*>::dump() const'
+LDFLAGS+=	-fuse-ld=lld
+.endif
+
 .include <bsd.port.mk>


More information about the dev-commits-ports-main mailing list