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; }
23 void tool(const std::string &t, const std::string &p);
34 std::string cross_prefix;
38 Architecture(Builder &b, const std::string &spec);
40 const std::string &get_name() const { return name; }
41 const std::string &get_system() const { return system; }
42 unsigned get_bits() const { return bits; }
43 const std::string &get_cpu() const { return cpu; }
44 bool match_name(const std::string &) const;
45 bool is_native() const { return native; }
47 void set_tool(const std::string &t, const std::string &p);
48 void set_cross_prefix(const std::string &);
49 std::string get_tool(const std::string &t) const;
50 const std::string &get_cross_prefix() const { return cross_prefix; }
53 std::string resolve_alias(const std::string &) const;
54 void parse_specification(const std::string &);
57 typedef std::map<std::string, Architecture> ArchMap;