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 | 266d0a7434a91dead63fe66891fcf17f5c6b187c (patch) | |
tree | 535d1e64fcb1b72532e615f7bcecd17c24e2ba57 /gold/options.cc | |
parent | fedc618eee02ae10102122a38fb696d520186b63 (diff) | |
download | fsf-binutils-gdb-266d0a7434a91dead63fe66891fcf17f5c6b187c.zip fsf-binutils-gdb-266d0a7434a91dead63fe66891fcf17f5c6b187c.tar.gz fsf-binutils-gdb-266d0a7434a91dead63fe66891fcf17f5c6b187c.tar.bz2 |
* 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 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. } |