From 811a1b144a03ab80ee86fcece764fa47f055909d Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 9 Apr 2024 06:41:52 +0200 Subject: [PATCH] cling: fix runtime error on darwin --- pkgs/development/interpreters/cling/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix index a53335fc4de6..a5a3de81bd5a 100644 --- a/pkgs/development/interpreters/cling/default.nix +++ b/pkgs/development/interpreters/cling/default.nix @@ -27,7 +27,7 @@ # Build with libc++ (LLVM) rather than stdlibc++ (GCC). # This is experimental and not all features work. -, useLLVMLibcxx ? false +, useLLVMLibcxx ? clangStdenv.isDarwin }: let @@ -119,7 +119,7 @@ let cxxFlags = if useLLVMLibcxx then [ "-I" "${lib.getDev llvmPackages_13.libcxx}/include/c++/v1" "-L" "${llvmPackages_13.libcxx}/lib" - "-l" "${llvmPackages_13.libcxx}/lib/libc++.so" + "-l" "${llvmPackages_13.libcxx}/lib/libc++${stdenv.hostPlatform.extensions.sharedLibrary}" ] else [ "-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}" "-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}/${stdenv.hostPlatform.config}"