lol

Merge pull request #162603 from jljusten/libclc-spirv

SPIRV-LLVM-Translator: Add llvm-spirv tool; libclc: 11.0.1 -> 12.0.1

authored by

Lassulus and committed by
GitHub
a6902b39 52a30d32

+13 -5
+6
pkgs/development/compilers/spirv-llvm-translator/default.nix
··· 30 30 # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist 31 31 doCheck = false; 32 32 33 + makeFlags = [ "all" "llvm-spirv" ]; 34 + 35 + postInstall = '' 36 + install -D tools/llvm-spirv/llvm-spirv $out/bin/llvm-spirv 37 + ''; 38 + 33 39 meta = with lib; { 34 40 homepage = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator"; 35 41 description = "A tool and a library for bi-directional translation between SPIR-V and LLVM IR";
+7 -5
pkgs/development/libraries/libclc/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, ninja, cmake, python3, llvmPackages }: 1 + { lib, stdenv, fetchFromGitHub, ninja, cmake, python3, llvmPackages, spirv-llvm-translator }: 2 2 3 3 let 4 4 llvm = llvmPackages.llvm; ··· 7 7 8 8 stdenv.mkDerivation rec { 9 9 pname = "libclc"; 10 - version = "11.0.1"; 10 + version = "12.0.1"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "llvm"; 14 14 repo = "llvm-project"; 15 15 rev = "llvmorg-${version}"; 16 - sha256 = "0bxh43hp1vl4axl3s9n2nb2ii8x1cbq98xz9c996f8rl5jy84ags"; 16 + sha256 = "08s5w2db9imb2yaqsvxs6pg21csi1cf6wa35rf8x6q07mam7j8qv"; 17 17 }; 18 18 sourceRoot = "source/libclc"; 19 19 ··· 21 21 postPatch = '' 22 22 substituteInPlace CMakeLists.txt \ 23 23 --replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_BINDIR} NO_DEFAULT_PATH )' \ 24 - 'find_program( LLVM_CLANG clang PATHS "${clang-unwrapped}/bin" NO_DEFAULT_PATH )' 24 + 'find_program( LLVM_CLANG clang PATHS "${clang-unwrapped}/bin" NO_DEFAULT_PATH )' \ 25 + --replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_BINDIR} NO_DEFAULT_PATH )' \ 26 + 'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )' 25 27 ''; 26 28 27 - nativeBuildInputs = [ cmake ninja python3 ]; 29 + nativeBuildInputs = [ cmake ninja python3 spirv-llvm-translator ]; 28 30 buildInputs = [ llvm clang-unwrapped ]; 29 31 strictDeps = true; 30 32 cmakeFlags = [