1 #ifndef ARCHITECTURE_H_
2 #define ARCHITECTURE_H_
4 #include <msp/datafile/loader.h>
11 Stores information about an architecture. This includes CPU type, model and
12 bitness and operating system.
17 class Loader: public Msp::DataFile::ObjectLoader<Architecture>
20 Loader(Architecture &);
23 typedef std::list<Pattern> PatternList;
33 std::string cross_prefix;
34 PatternList sharedlib_patterns;
35 PatternList staticlib_patterns;
36 PatternList executable_patterns;
39 Architecture(Builder &b, const std::string &spec);
41 const std::string &get_name() const { return name; }
42 const std::string &get_system() const { return system; }
43 unsigned get_bits() const { return bits; }
44 const std::string &get_cpu() const { return cpu; }
45 bool match_name(const std::string &) const;
46 bool is_native() const { return native; }
47 bool is_cross() const { return !cross_prefix.empty(); }
49 const std::string &get_cross_prefix() const { return cross_prefix; }
51 const PatternList &get_shared_library_patterns() const { return sharedlib_patterns; }
52 const PatternList &get_static_library_patterns() const { return staticlib_patterns; }
53 const PatternList &get_executable_patterns() const { return executable_patterns; }
56 std::string resolve_alias(const std::string &) const;
57 void parse_specification(const std::string &);