rustc: link libc++abi on Darwin

This commit is contained in:
Randy Eckenrode 2023-07-08 07:32:32 -06:00
parent 6d9902baac
commit 93320f3e30
No known key found for this signature in database
GPG key ID: 64C1CD4EC2A600D9

View file

@ -53,7 +53,7 @@ in stdenv.mkDerivation rec {
NIX_LDFLAGS = toString (
# when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch'
optional (stdenv.isLinux && !withBundledLLVM) "--push-state --as-needed -lstdc++ --pop-state"
++ optional (stdenv.isDarwin && !withBundledLLVM) "-lc++"
++ optional (stdenv.isDarwin && !withBundledLLVM) "-lc++ -lc++abi"
++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib");
# Increase codegen units to introduce parallelism within the compiler.