diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-12-20T12·19+0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-12-20T12·19+0000 |
commit | 769f66216504cd882ac7b6bdfa0dd1ff26f3efe5 (patch) | |
tree | 0a96a5f349ab1326d41547cd7a0578f06c62ec93 /src/libmain | |
parent | 0c1198cf08576f16633b2344dc6513cefb567cfc (diff) |
nix-shell: Don't warn about the lack of a GC root
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index b0b69f7f617d..999b5023802c 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -35,8 +35,11 @@ static void sigintHandler(int signo) } +static bool gcWarning = true; + void printGCWarning() { + if (!gcWarning) return; static bool haveWarned = false; warnOnce(haveWarned, "you did not specify `--add-root'; " @@ -212,6 +215,8 @@ static void initAndRun(int argc, char * * argv) settings.useBuildHook = false; else if (arg == "--show-trace") settings.showTrace = true; + else if (arg == "--no-gc-warning") + gcWarning = false; else if (arg == "--option") { ++i; if (i == args.end()) throw UsageError("`--option' requires two arguments"); string name = *i; |