aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-07-06 22:15:12 +0000
committerCary Coutant <ccoutant@google.com>2011-07-06 22:15:12 +0000
commit221597a548c93ec0cd0de1f90f206ae04be7f83d (patch)
treedec23f370ddddf9004c8f66ed19ff803cabdc73f /gold/options.h
parentfacde0e593ae909c801e03cada83c05bec89aad5 (diff)
downloadgdb-221597a548c93ec0cd0de1f90f206ae04be7f83d.zip
gdb-221597a548c93ec0cd0de1f90f206ae04be7f83d.tar.gz
gdb-221597a548c93ec0cd0de1f90f206ae04be7f83d.tar.bz2
* incremental.cc (Sized_incremental_binary::do_file_has_changed):
Check disposition for startup file. (Incremental_inputs::report_command_line): Ignore --incremental-startup-unchanged option. * options.cc (General_options::parse_incremental_startup_unchanged): New function. (General_options::General_options): Initialize new data member. * options.h (Incremental_disposition): Add INCREMENTAL_STARTUP. (General_options): Add --incremental-startup-unchanged option. (General_options::incremental_startup_disposition): New function. (General_options::incremental_startup_disposition_): New data member.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gold/options.h b/gold/options.h
index c73bd45..230900a 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -63,6 +63,11 @@ class Script_info;
enum Incremental_disposition
{
+ // Startup files that appear before the first disposition option.
+ // These will default to INCREMENTAL_CHECK unless the
+ // --incremental-startup-unchanged option is given.
+ // (For files added implicitly by gcc before any user options.)
+ INCREMENTAL_STARTUP,
// Determine the status from the timestamp (default).
INCREMENTAL_CHECK,
// Assume the file changed from the previous build.
@@ -822,6 +827,10 @@ class General_options
DEFINE_special(incremental_unknown, options::TWO_DASHES, '\0',
N_("Use timestamps to check files (default)"), NULL);
+ DEFINE_special(incremental_startup_unchanged, options::TWO_DASHES, '\0',
+ N_("Assume startup files unchanged "
+ "(files preceding this option)"), NULL);
+
DEFINE_percent(incremental_patch, options::TWO_DASHES, '\0', 10,
N_("Amount of extra space to allocate for patches"),
N_("PERCENT"));
@@ -1342,6 +1351,12 @@ class General_options
incremental_disposition() const
{ return this->incremental_disposition_; }
+ // The disposition to use for startup files (those that precede the
+ // first --incremental-changed, etc. option).
+ Incremental_disposition
+ incremental_startup_disposition() const
+ { return this->incremental_startup_disposition_; }
+
// Return true if S is the name of a library excluded from automatic
// symbol export.
bool
@@ -1459,9 +1474,12 @@ class General_options
// --incremental-unchanged or --incremental-unknown option. The
// value may change as we proceed parsing the command line flags.
Incremental_disposition incremental_disposition_;
+ // The disposition to use for startup files (those marked
+ // INCREMENTAL_STARTUP).
+ Incremental_disposition incremental_startup_disposition_;
// Whether we have seen one of the options that require incremental
- // build (--incremental-changed, --incremental-unchanged or
- // --incremental-unknown)
+ // build (--incremental-changed, --incremental-unchanged,
+ // --incremental-unknown, or --incremental-startup-unchanged).
bool implicit_incremental_;
// Libraries excluded from automatic export, via --exclude-libs.
Unordered_set<std::string> excluded_libs_;