From e6b738aa1060bc660032d9ac45a7e74bc3a3dbcd Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Tue, 14 Jul 2026 11:50:44 -0400 Subject: [PATCH] openshadinglanguage: enable LLVM_STATIC to avoid conflicts When OSL is included in a downstream consumer that has other dependencies with different libllvm versions, crashes often ensue. Avoid this by linking statically to it. This then requires libxml on Linux. Notably, this fixes blender when built with rocmSupport, as ROCm deps depend on a conflicting libllvm. --- pkgs/by-name/op/openshadinglanguage/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/openshadinglanguage/package.nix b/pkgs/by-name/op/openshadinglanguage/package.nix index 9d0dc4df17a1..d0f4997ccacd 100644 --- a/pkgs/by-name/op/openshadinglanguage/package.nix +++ b/pkgs/by-name/op/openshadinglanguage/package.nix @@ -32,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: { }; cmakeFlags = [ + (lib.cmakeBool "LLVM_STATIC" true) (lib.cmakeBool "USE_QT" false) # Build system implies llvm-config and llvm-as are in the same directory. @@ -60,6 +61,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ hexdump libclang + libxml2 llvm openexr openimageio @@ -68,9 +70,6 @@ stdenv.mkDerivation (finalAttrs: { python3Packages.pybind11 robin-map zlib - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - libxml2 ]; propagatedBuildInputs = [