DEFINE_bool(strip_lto_sections, options::TWO_DASHES, '\0', true,
N_("Strip LTO intermediate code sections"), NULL);
- DEFINE_bool(no_keep_memory, options::TWO_DASHES, 's', false,
- N_("Use less memory and more disk I/O (included only for compatibility with GNU ld)"), NULL);
+ DEFINE_bool(no_keep_memory, options::TWO_DASHES, '\0', false,
+ N_("Use less memory and more disk I/O "
+ "(included only for compatibility with GNU ld)"), NULL);
DEFINE_bool(shared, options::ONE_DASH, '\0', false,
N_("Generate shared library"), NULL);
DEFINE_special(static, options::ONE_DASH, '\0',
N_("Do not link against shared libraries"), NULL);
+ DEFINE_bool(icf, options::TWO_DASHES, '\0', false,
+ N_("Identical Code Folding (Fold identical functions)"),
+ N_("Don't fold identical functions (default)"));
+
+ DEFINE_uint(icf_iterations, options::TWO_DASHES , '\0', 0,
+ N_("Number of iterations of ICF (default 2)"), N_("COUNT"));
+
+ DEFINE_bool(print_icf_sections, options::TWO_DASHES, '\0', false,
+ N_("List folded identical sections on stderr"),
+ N_("Do not list folded identical sections"));
+
+ DEFINE_set(keep_unique, options::TWO_DASHES, '\0',
+ N_("Do not fold this symbol during ICF"), N_("SYMBOL"));
+
DEFINE_bool(gc_sections, options::TWO_DASHES, '\0', false,
N_("Remove unused sections"),
N_("Don't remove unused sections (default)"));
// any problems.
void finalize();
+ // True if we printed the version information.
+ bool
+ printed_version() const
+ { return this->printed_version_; }
+
// The macro defines output() (based on --output), but that's a
// generic name. Provide this alternative name, which is clearer.
const char*
void
add_plugin_option(const char* opt);
+ // Whether we printed version information.
+ bool printed_version_;
// Whether to mark the stack as executable.
Execstack execstack_status_;
// Whether to do a static link.
// --incremental-unchanged or --incremental-unknown option. The
// value may change as we proceed parsing the command line flags.
Incremental_disposition incremental_disposition_;
- // Wheater we have seen one of the options that require incremental
+ // Whether we have seen one of the options that require incremental
// build (--incremental-changed, --incremental-unchanged or
// --incremental-unknown)
bool implicit_incremental_;
Command_line(const Command_line&);
Command_line& operator=(const Command_line&);
+ // This is a dummy class to provide a constructor that runs before
+ // the constructor for the General_options. The Pre_options constructor
+ // is used as a hook to set the flag enabling the options to register
+ // themselves.
+ struct Pre_options {
+ Pre_options();
+ };
+
+ // This must come before options_!
+ Pre_options pre_options_;
General_options options_;
Position_dependent_options position_options_;
Script_options script_options_;