is_in_sysroot() const
{ return this->is_in_sysroot_; }
+ // Return whether this is considered a system directory.
+ bool
+ is_system_directory() const
+ { return this->put_in_sysroot_ || this->is_in_sysroot_; }
+
private:
+ // The directory name.
std::string name_;
+ // True if the sysroot should be added as a prefix for this
+ // directory (if there is a sysroot). This is true for system
+ // directories that we search by default.
bool put_in_sysroot_;
+ // True if this directory is in the sysroot (if there is a sysroot).
+ // This is true if there is a sysroot and either 1) put_in_sysroot_
+ // is true, or 2) the directory happens to be in the sysroot based
+ // on a pathname comparison.
bool is_in_sysroot_;
};
N_("Try to detect violations of the One Definition Rule"),
NULL);
+ DEFINE_bool(discard_locals, options::TWO_DASHES, 'X', false,
+ N_("Delete all temporary local symbols"), NULL);
+
DEFINE_bool(dynamic_list_data, options::TWO_DASHES, '\0', false,
N_("Add data symbols to dynamic symbols"), NULL);
DEFINE_string(entry, options::TWO_DASHES, 'e', NULL,
N_("Set program start address"), N_("ADDRESS"));
+ DEFINE_special(exclude_libs, options::TWO_DASHES, '\0',
+ N_("Exclude libraries from automatic export"),
+ N_(("lib,lib ...")));
+
DEFINE_bool(export_dynamic, options::TWO_DASHES, 'E', false,
N_("Export all dynamic symbols"),
N_("Do not export all dynamic symbols (default)"));
DEFINE_special(version_script, options::TWO_DASHES, '\0',
N_("Read version script"), N_("FILE"));
+ DEFINE_bool(warn_search_mismatch, options::TWO_DASHES, '\0', true,
+ N_("Warn when skipping an incompatible library"),
+ N_("Don't warn when skipping an incompatible library"));
+
DEFINE_bool(whole_archive, options::TWO_DASHES, '\0', false,
N_("Include all archive contents"),
N_("Include only needed archive contents"));
Object_format format_enum() const;
Object_format oformat_enum() const;
+ // Return whether FILENAME is in a system directory.
+ bool
+ is_in_system_directory(const std::string& name) const;
+
// These are the best way to get access to the execstack state,
// not execstack() and noexecstack() which are hard to use properly.
bool
incremental_disposition() const
{ return this->incremental_disposition_; }
+ // Return true if S is the name of a library excluded from automatic
+ // symbol export.
+ bool
+ check_excluded_libs (const std::string &s) const;
+
private:
// Don't copy this structure.
General_options(const General_options&);
// build (--incremental-changed, --incremental-unchanged or
// --incremental-unknown)
bool implicit_incremental_;
+ // Libraries excluded from automatic export via --exclude-libs
+ Unordered_set<std::string> excluded_libs_;
};
// The position-dependent options. We use this to store the state of
Input_file_group* group_;
};
+typedef std::vector<Input_argument> Input_argument_list;
+
// A group from the command line. This is a set of arguments within
// --start-group ... --end-group.
class Input_file_group
{
public:
- typedef std::vector<Input_argument> Files;
- typedef Files::const_iterator const_iterator;
+ typedef Input_argument_list::const_iterator const_iterator;
Input_file_group()
: files_()
{ return this->files_.end(); }
private:
- Files files_;
+ Input_argument_list files_;
};
// A list of files from the command line or a script.
class Input_arguments
{
public:
- typedef std::vector<Input_argument> Input_argument_list;
typedef Input_argument_list::const_iterator const_iterator;
Input_arguments()