diff --git a/Makefile.config.in b/Makefile.config.in
index 59730b646..f3821b2ef 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -1,5 +1,4 @@
AR = @AR@
-BDW_GC_LIBS = @BDW_GC_LIBS@
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
CC = @CC@
CFLAGS = @CFLAGS@
diff --git a/configure.ac b/configure.ac
index f5b1614f1..60c743f83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,17 +219,6 @@ if test -n "$enable_s3"; then
fi
-# Whether to use the Boehm garbage collector.
-AC_ARG_ENABLE(gc, AC_HELP_STRING([--enable-gc],
- [enable garbage collection in the Nix expression evaluator (requires Boehm GC) [default=no]]),
- gc=$enableval, gc=no)
-if test "$gc" = yes; then
- PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
- CXXFLAGS="$BDW_GC_CFLAGS $CXXFLAGS"
- AC_DEFINE(HAVE_BOEHMGC, 1, [Whether to use the Boehm garbage collector.])
-fi
-
-
# documentation generation switch
AC_ARG_ENABLE(doc-gen, AC_HELP_STRING([--disable-doc-gen],
[disable documentation generation]),
diff --git a/doc/manual/installation/prerequisites-source.xml b/doc/manual/installation/prerequisites-source.xml
index e87d0de21..426768095 100644
--- a/doc/manual/installation/prerequisites-source.xml
+++ b/doc/manual/installation/prerequisites-source.xml
@@ -50,14 +50,6 @@
or higher. If your distribution does not provide it, please install
it from .
- The Boehm
- garbage collector to reduce the evaluator’s memory
- consumption (optional). To enable it, install
- pkgconfig and the Boehm garbage collector, and
- pass the flag to
- configure.
-
The boost library of version
1.66.0 or higher. It can be obtained from the official web site
.
diff --git a/release-common.nix b/release-common.nix
index 4c5565985..4ad29c9b0 100644
--- a/release-common.nix
+++ b/release-common.nix
@@ -50,7 +50,7 @@ rec {
buildDeps =
[ curl
bzip2 xz brotli editline
- openssl pkgconfig sqlite boehmgc
+ openssl pkgconfig sqlite
boost
# Tests
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 99ada041f..72fc2a349 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -177,16 +177,6 @@ static Symbol getName(const AttrName & name, EvalState & state, Env & env)
}
-static bool gcInitialised = false;
-
-void initGC()
-{
- if (gcInitialised) return;
-
- gcInitialised = true;
-}
-
-
/* Very hacky way to parse $NIX_PATH, which is colon-separated, but
can contain URLs (e.g. "nixpkgs=https://bla...:foo=https://"). */
static Strings parseNixPath(const string & s)
@@ -258,11 +248,7 @@ EvalState::EvalState(const Strings & _searchPath, ref store)
{
countCalls = getEnv("NIX_COUNT_CALLS", "0") != "0";
- assert(gcInitialised);
-
-#if 0
static_assert(sizeof(Env) <= 16, "environment must be <= 16 bytes");
-#endif
/* Initialise the Nix expression search path. */
if (!evalSettings.pureEval) {
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 36bef09e3..0ad6d6f24 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -97,10 +97,6 @@ typedef std::pair SearchPathElem;
typedef std::list SearchPath;
-/* Initialise the Boehm GC, if applicable. */
-void initGC();
-
-
class EvalState
{
public:
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 64c1dc357..de429eba7 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -75,7 +75,6 @@ void mainWrapped(int argc, char * * argv)
}
initNix();
- initGC();
programPath = argv[0];
string programName = baseNameOf(programPath);