diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-02-06 23:49:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-02-06 23:49:43 +0000 |
commit | ffaaee022cde389688383661184816ac26ff558d (patch) | |
tree | 3944251fde747335e39555383d8733598f79d4d9 /gold/options.cc | |
parent | 2f5e429b8deb4fd79252e89c9621b86995ff9198 (diff) | |
download | binutils-redhat-ffaaee022cde389688383661184816ac26ff558d.tar.gz |
* options.h (enum Incremental_disposition): Define.
(class General_options): Add new options: --incremental,
--incremental_changed, --incremental_unchanged,
--incremental_unknown. Add incremental_disposition_ and
implicit_incremental_ fields.
(General_options::incremental_disposition): New function.
(class Position_dependent_options): Add incremental_disposition
option.
(Position_dependent_options::copy_from_options): Set incremental
dispositions.
* options.cc (General_options::parse_incremental_changed): New
function.
(General_options::parse_incremental_unchanged): New function.
(General_options::parse_incremental_unknown): New function.
(General_options::General_options): Initialize new fields
incremental_disposition_ and implicit_incremental_.
(General_options::finalize): Check for uasge of --incremental-*
without --incremental.
Diffstat (limited to 'gold/options.cc')
-rw-r--r-- | gold/options.cc | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/gold/options.cc b/gold/options.cc index ff9bd41c19..35ed863137 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. } |