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.
This commit is contained in:
Andrew Marshall
2026-07-15 09:30:38 -04:00
parent e7a3ca8092
commit e6b738aa10
@@ -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 = [