Skip to content

Commit

Permalink
cling: avoid dynamic linking against libLLVM.so to fix xeus-cling
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Nov 30, 2024
1 parent a5fb96b commit 69f0f79
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pkgs/by-name/cl/cling/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ let
sparseCheckout = ["clang"];
};

llvm = llvmPackages_13.llvm.override { enableSharedLibraries = false; };

unwrapped = stdenv.mkDerivation rec {
pname = "cling-unwrapped";
version = "1.0";
Expand Down Expand Up @@ -72,12 +74,12 @@ let
strictDeps = true;

cmakeFlags = [
"-DLLVM_BINARY_DIR=${llvmPackages_13.llvm.out}"
"-DLLVM_CONFIG=${llvmPackages_13.llvm.dev}/bin/llvm-config"
"-DLLVM_LIBRARY_DIR=${llvmPackages_13.llvm.lib}/lib"
"-DLLVM_MAIN_INCLUDE_DIR=${llvmPackages_13.llvm.dev}/include"
"-DLLVM_TABLEGEN_EXE=${llvmPackages_13.llvm.out}/bin/llvm-tblgen"
"-DLLVM_TOOLS_BINARY_DIR=${llvmPackages_13.llvm.out}/bin"
"-DLLVM_BINARY_DIR=${llvm.out}"
"-DLLVM_CONFIG=${llvm.dev}/bin/llvm-config"
"-DLLVM_LIBRARY_DIR=${llvm.lib}/lib"
"-DLLVM_MAIN_INCLUDE_DIR=${llvm.dev}/include"
"-DLLVM_TABLEGEN_EXE=${llvm.out}/bin/llvm-tblgen"
"-DLLVM_TOOLS_BINARY_DIR=${llvm.out}/bin"
"-DLLVM_BUILD_TOOLS=Off"
"-DLLVM_TOOL_CLING_BUILD=ON"

Expand Down Expand Up @@ -139,7 +141,7 @@ let
"-nostdinc"
"-nostdinc++"

"-resource-dir" "${llvmPackages_13.llvm.lib}/lib"
"-resource-dir" "${llvm.lib}/lib"

"-isystem" "${lib.getLib unwrapped}/lib/clang/${llvmPackages_13.clang.version}/include"
]
Expand Down

0 comments on commit 69f0f79

Please sign in to comment.