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}"