diff options
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/gold/options.h b/gold/options.h index 59e2267..7a694a9 100644 --- a/gold/options.h +++ b/gold/options.h @@ -770,9 +770,20 @@ class General_options DEFINE_string(dynamic_linker, options::TWO_DASHES, 'I', NULL, N_("Set dynamic linker path"), N_("PROGRAM")); - DEFINE_bool(incremental, options::TWO_DASHES, '\0', false, - N_("Work in progress; do not use"), - N_("Do a full build")); + DEFINE_special(incremental, options::TWO_DASHES, '\0', + N_("Do an incremental link if possible; " + "otherwise, do a full link and prepare output " + "for incremental linking"), NULL); + + DEFINE_special(no_incremental, options::TWO_DASHES, '\0', + N_("Do a full link (default)"), NULL); + + DEFINE_special(incremental_full, options::TWO_DASHES, '\0', + N_("Do a full link and " + "prepare output for incremental linking"), NULL); + + DEFINE_special(incremental_update, options::TWO_DASHES, '\0', + N_("Do an incremental link; exit if not possible"), NULL); DEFINE_special(incremental_changed, options::TWO_DASHES, '\0', N_("Assume files changed"), NULL); @@ -1263,6 +1274,25 @@ class General_options finalize_dynamic_list() { this->dynamic_list_.version_script_info()->finalize(); } + // The mode selected by the --incremental options. + enum Incremental_mode + { + // No incremental linking (--no-incremental). + INCREMENTAL_OFF, + // Incremental update only (--incremental-update). + INCREMENTAL_UPDATE, + // Force a full link, but prepare for subsequent incremental link + // (--incremental-full). + INCREMENTAL_FULL, + // Incremental update if possible, fallback to full link (--incremental). + INCREMENTAL_AUTO + }; + + // The incremental linking mode. + Incremental_mode + incremental_mode() const + { return this->incremental_mode_; } + // The disposition given by the --incremental-changed, // --incremental-unchanged or --incremental-unknown option. The // value may change as we proceed parsing the command line flags. @@ -1381,6 +1411,8 @@ class General_options // script.cc, we store this as a Script_options object, even though // we only use a single Version_tree from it. Script_options dynamic_list_; + // The incremental linking mode. + Incremental_mode incremental_mode_; // The disposition given by the --incremental-changed, // --incremental-unchanged or --incremental-unknown option. The // value may change as we proceed parsing the command line flags. |