1 #ifndef ARCHITECTURE_H_
2 #define ARCHITECTURE_H_
4 #include <msp/datafile/loader.h>
10 // XXX Add lib/exe prefix/suffix fields. Some archs may need multiple alternatives, how to handle this?
14 class Loader: public Msp::DataFile::Loader
20 Loader(Architecture &);
21 Architecture &get_object() { return arch; }
24 typedef std::list<Pattern> PatternList;
34 std::string cross_prefix;
35 PatternList sharedlib_patterns;
36 PatternList staticlib_patterns;
37 PatternList executable_patterns;
40 Architecture(Builder &b, const std::string &spec);
42 const std::string &get_name() const { return name; }
43 const std::string &get_system() const { return system; }
44 unsigned get_bits() const { return bits; }
45 const std::string &get_cpu() const { return cpu; }
46 bool match_name(const std::string &) const;
47 bool is_native() const { return native; }
49 void set_cross_prefix(const std::string &);
50 const std::string &get_cross_prefix() const { return cross_prefix; }
52 const PatternList &get_shared_library_patterns() const { return sharedlib_patterns; }
53 const PatternList &get_static_library_patterns() const { return staticlib_patterns; }
54 const PatternList &get_executable_patterns() const { return executable_patterns; }
57 std::string resolve_alias(const std::string &) const;
58 void parse_specification(const std::string &);
61 typedef std::map<std::string, Architecture> ArchMap;