aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc31
1 files changed, 30 insertions, 1 deletions
diff --git a/gold/options.cc b/gold/options.cc
index ff9bd41..35ed863 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -290,6 +290,30 @@ General_options::parse_defsym(const char*, const char* arg,
}
void
+General_options::parse_incremental_changed(const char*, const char*,
+ Command_line*)
+{
+ this->implicit_incremental_ = true;
+ this->incremental_disposition_ = INCREMENTAL_CHANGED;
+}
+
+void
+General_options::parse_incremental_unchanged(const char*, const char*,
+ Command_line*)
+{
+ this->implicit_incremental_ = true;
+ this->incremental_disposition_ = INCREMENTAL_UNCHANGED;
+}
+
+void
+General_options::parse_incremental_unknown(const char*, const char*,
+ Command_line*)
+{
+ this->implicit_incremental_ = true;
+ this->incremental_disposition_ = INCREMENTAL_CHECK;
+}
+
+void
General_options::parse_library(const char*, const char* arg,
Command_line* cmdline)
{
@@ -621,7 +645,8 @@ namespace gold
General_options::General_options()
: execstack_status_(General_options::EXECSTACK_FROM_INPUT), static_(false),
- do_demangle_(false), plugins_()
+ do_demangle_(false), plugins_(),
+ incremental_disposition_(INCREMENTAL_CHECK), implicit_incremental_(false)
{
}
@@ -839,6 +864,10 @@ General_options::finalize()
"[0.0, 1.0)"),
this->hash_bucket_empty_fraction());
+ if (this->implicit_incremental_ && !this->incremental())
+ gold_fatal(_("Options --incremental-changed, --incremental-unchanged, "
+ "--incremental-unknown require the use of --incremental"));
+
// FIXME: we can/should be doing a lot more sanity checking here.
}