diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix index 93824894455c..948d326d6594 100644 --- a/pkgs/development/ocaml-modules/llvm/default.nix +++ b/pkgs/development/ocaml-modules/llvm/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation { strictDeps = true; + preConfigure = lib.optionalString (lib.versionAtLeast version "13.0.0") '' + cd llvm + ''; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=YES" # fixes bytecode builds "-DLLVM_OCAML_OUT_OF_TREE=TRUE"