cling: fix runtime error on darwin

This commit is contained in:
Weijia Wang 2024-04-09 06:41:52 +02:00
parent 18c40a3873
commit 811a1b144a
1 changed files with 2 additions and 2 deletions

View File

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