about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2024-04-09 06:41:52 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2024-04-09 06:41:52 +0200
commit811a1b144a03ab80ee86fcece764fa47f055909d (patch)
tree091a3d20db494c5f7b14c3039bf617a48ad33b1a /pkgs/development/interpreters
parent18c40a3873b361636e0d13957e5995dca06797bf (diff)
cling: fix runtime error on darwin
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/cling/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/cling/default.nix b/pkgs/development/interpreters/cling/default.nix
index a53335fc4de6c..a5a3de81bd5a1 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}"