Skip to content

Commit

Permalink
libclc: use the same LLVM in spirv-llvm-translator as in the build
Browse files Browse the repository at this point in the history
  • Loading branch information
rrbutani authored and RaitoBezarius committed Apr 14, 2023
1 parent 9843d0d commit 54e7bb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkgs/development/libraries/libclc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
let
llvm = llvmPackages.llvm;
clang-unwrapped = llvmPackages.clang-unwrapped;
spirv = spirv-llvm-translator.override { inherit llvm; };
in

stdenv.mkDerivation rec {
Expand All @@ -23,10 +24,10 @@ stdenv.mkDerivation rec {
--replace 'find_program( LLVM_CLANG clang PATHS ''${LLVM_BINDIR} NO_DEFAULT_PATH )' \
'find_program( LLVM_CLANG clang PATHS "${clang-unwrapped}/bin" NO_DEFAULT_PATH )' \
--replace 'find_program( LLVM_SPIRV llvm-spirv PATHS ''${LLVM_BINDIR} NO_DEFAULT_PATH )' \
'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv-llvm-translator}/bin" NO_DEFAULT_PATH )'
'find_program( LLVM_SPIRV llvm-spirv PATHS "${spirv}/bin" NO_DEFAULT_PATH )'
'';

nativeBuildInputs = [ cmake ninja python3 spirv-llvm-translator ];
nativeBuildInputs = [ cmake ninja python3 spirv ];
buildInputs = [ llvm clang-unwrapped ];
strictDeps = true;
cmakeFlags = [
Expand Down

0 comments on commit 54e7bb3

Please sign in to comment.