aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 8df2a7f52..fb70cb076 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -31,8 +31,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'; "
@@ -208,6 +211,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;