guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add spirv-llvm-translator.


From: guix-commits
Subject: 01/02: gnu: Add spirv-llvm-translator.
Date: Thu, 30 Nov 2023 05:47:25 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 0bf46a4fc8c8d2c9b7dfba1211e42d8af62a3b55
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Nov 30 12:33:17 2023 +0200

    gnu: Add spirv-llvm-translator.
    
    * gnu/packages/vulkan.scm (spirv-llvm-translator): New variable.
    
    Change-Id: I9e447b7d69c7fdf620854362ca8aa98a2dfa1c87
---
 gnu/packages/vulkan.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 1d2e58f1d4..ca771a30b1 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages wine)
@@ -152,6 +153,38 @@ parser,disassembler, validator, and optimizer for SPIR-V.")
 SPIR-V, aiming to emit GLSL or MSL that looks like human-written code.")
     (license license:asl2.0)))
 
+(define-public spirv-llvm-translator
+  (package
+    (name "spirv-llvm-translator")
+    (version "15.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/KhronosGroup/SPIRV-LLVM-Translator";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0lix3bpli7i9csz26bq0d9g1v7c0gim498m5bm2gp8kifj2yih1s"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="
+                            (assoc-ref %build-inputs "spirv-headers")
+                            "/include/spirv")
+             (string-append "-DLLVM_EXTERNAL_LIT="
+                            (assoc-ref %build-inputs "python-lit")
+                            "/bin/lit")
+             "-DLLVM_SPIRV_INCLUDE_TESTS=ON")))
+    (inputs (list llvm-15))
+    (native-inputs (list clang-15 llvm-15 python-lit spirv-headers))
+    (home-page "https://github.com/KhronosGroup/SPIRV-LLVM-Translator";)
+    (synopsis "Bi-directional translation between SPIR-V and LLVM IR")
+    (description
+     "The LLVM/SPIR-V Bi-Directional Translator is a library and tool for
+translation between LLVM IR and SPIR-V.")
+    (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]