From a9fd593f394b838a0792d76d2c4cfae388f06ec4 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 2 Nov 2023 23:31:01 +0100 Subject: [PATCH] Revert "spirv-llvm-translator: move spirv-tools to nativeBuildInputs" This reverts commit 69a71a0ec2da81a4213e1f0ceedb95545d9e2414. Previously, the only use for spirv-tools was its commands being used to run tests, but now, spirv-llvm-translator also links against its libraries. Tests won't be run when cross compiling to a non-compatible architecture anyway, so to keep spirv-llvm-translator cross compiling, we should move spirv-tools back to being a build input so that the libraries can be found. We could try to convince CMake to use SPIRV-Tools.cmake from the host spirv-tools and SPIRV-Tools-tools.cmake from the build spirv-tools, but since we never actually need both when cross compiling it's not worth it. This fixes the cross build LLVM/SPIRV-LLVM-Translator 16. --- pkgs/development/compilers/spirv-llvm-translator/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/spirv-llvm-translator/default.nix b/pkgs/development/compilers/spirv-llvm-translator/default.nix index c6c743ce1e59..f19501a6d7d8 100644 --- a/pkgs/development/compilers/spirv-llvm-translator/default.nix +++ b/pkgs/development/compilers/spirv-llvm-translator/default.nix @@ -55,10 +55,10 @@ stdenv.mkDerivation { }) ]; - nativeBuildInputs = [ pkg-config cmake spirv-tools ] + nativeBuildInputs = [ pkg-config cmake ] ++ (if isROCm then [ llvm ] else [ llvm.dev ]); - buildInputs = [ spirv-headers ] + buildInputs = [ spirv-headers spirv-tools ] ++ lib.optionals (!isROCm) [ llvm ]; nativeCheckInputs = [ lit ];