mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
Remove Boehm GC dependency
This commit is contained in:
parent
69adbf5c77
commit
80accdcebe
7 changed files with 1 additions and 40 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
BDW_GC_LIBS = @BDW_GC_LIBS@
|
|
||||||
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
|
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
|
|
|
||||||
11
configure.ac
11
configure.ac
|
|
@ -219,17 +219,6 @@ if test -n "$enable_s3"; then
|
||||||
fi
|
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
|
# documentation generation switch
|
||||||
AC_ARG_ENABLE(doc-gen, AC_HELP_STRING([--disable-doc-gen],
|
AC_ARG_ENABLE(doc-gen, AC_HELP_STRING([--disable-doc-gen],
|
||||||
[disable documentation generation]),
|
[disable documentation generation]),
|
||||||
|
|
|
||||||
|
|
@ -50,14 +50,6 @@
|
||||||
or higher. If your distribution does not provide it, please install
|
or higher. If your distribution does not provide it, please install
|
||||||
it from <link xlink:href="http://www.sqlite.org/" />.</para></listitem>
|
it from <link xlink:href="http://www.sqlite.org/" />.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The <link
|
|
||||||
xlink:href="http://www.hboehm.info/gc/">Boehm
|
|
||||||
garbage collector</link> to reduce the evaluator’s memory
|
|
||||||
consumption (optional). To enable it, install
|
|
||||||
<literal>pkgconfig</literal> and the Boehm garbage collector, and
|
|
||||||
pass the flag <option>--enable-gc</option> to
|
|
||||||
<command>configure</command>.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>The <literal>boost</literal> library of version
|
<listitem><para>The <literal>boost</literal> library of version
|
||||||
1.66.0 or higher. It can be obtained from the official web site
|
1.66.0 or higher. It can be obtained from the official web site
|
||||||
<link xlink:href="https://www.boost.org/" />.</para></listitem>
|
<link xlink:href="https://www.boost.org/" />.</para></listitem>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ rec {
|
||||||
buildDeps =
|
buildDeps =
|
||||||
[ curl
|
[ curl
|
||||||
bzip2 xz brotli editline
|
bzip2 xz brotli editline
|
||||||
openssl pkgconfig sqlite boehmgc
|
openssl pkgconfig sqlite
|
||||||
boost
|
boost
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
|
|
||||||
|
|
@ -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
|
/* Very hacky way to parse $NIX_PATH, which is colon-separated, but
|
||||||
can contain URLs (e.g. "nixpkgs=https://bla...:foo=https://"). */
|
can contain URLs (e.g. "nixpkgs=https://bla...:foo=https://"). */
|
||||||
static Strings parseNixPath(const string & s)
|
static Strings parseNixPath(const string & s)
|
||||||
|
|
@ -258,11 +248,7 @@ EvalState::EvalState(const Strings & _searchPath, ref<Store> store)
|
||||||
{
|
{
|
||||||
countCalls = getEnv("NIX_COUNT_CALLS", "0") != "0";
|
countCalls = getEnv("NIX_COUNT_CALLS", "0") != "0";
|
||||||
|
|
||||||
assert(gcInitialised);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static_assert(sizeof(Env) <= 16, "environment must be <= 16 bytes");
|
static_assert(sizeof(Env) <= 16, "environment must be <= 16 bytes");
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialise the Nix expression search path. */
|
/* Initialise the Nix expression search path. */
|
||||||
if (!evalSettings.pureEval) {
|
if (!evalSettings.pureEval) {
|
||||||
|
|
|
||||||
|
|
@ -97,10 +97,6 @@ typedef std::pair<std::string, std::string> SearchPathElem;
|
||||||
typedef std::list<SearchPathElem> SearchPath;
|
typedef std::list<SearchPathElem> SearchPath;
|
||||||
|
|
||||||
|
|
||||||
/* Initialise the Boehm GC, if applicable. */
|
|
||||||
void initGC();
|
|
||||||
|
|
||||||
|
|
||||||
class EvalState
|
class EvalState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ void mainWrapped(int argc, char * * argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
initNix();
|
initNix();
|
||||||
initGC();
|
|
||||||
|
|
||||||
programPath = argv[0];
|
programPath = argv[0];
|
||||||
string programName = baseNameOf(programPath);
|
string programName = baseNameOf(programPath);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue