aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index a7a5ad039..645b1ef01 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -52,26 +52,6 @@ extern char * * environ __attribute__((weak));
namespace nix {
-void initLibUtil() {
- // Check that exception handling works. Exception handling has been observed
- // not to work on darwin when the linker flags aren't quite right.
- // In this case we don't want to expose the user to some unrelated uncaught
- // exception, but rather tell them exactly that exception handling is
- // broken.
- // When exception handling fails, the message tends to be printed by the
- // C++ runtime, followed by an abort.
- // For example on macOS we might see an error such as
- // libc++abi: terminating with uncaught exception of type nix::SysError: error: C++ exception handling is broken. This would appear to be a problem with the way Nix was compiled and/or linked and/or loaded.
- bool caught = false;
- try {
- throwExceptionSelfCheck();
- } catch (const nix::Error & _e) {
- caught = true;
- }
- // This is not actually the main point of this check, but let's make sure anyway:
- assert(caught);
-}
-
std::optional<std::string> getEnv(const std::string & key)
{
char * value = getenv(key.c_str());