]> git.tdb.fi Git - builder.git/blobdiff - source/builder.h
Refactor arch handling a bit
[builder.git] / source / builder.h
index 19885c56291729d971776ec57a3295c546073edb..8eae21681f579ae21b7b686a7880c058f935e230 100644 (file)
@@ -43,7 +43,8 @@ public:
        Target   *get_library(const std::string &, const StringList &, LibMode);
        const Msp::FS::Path &get_cwd() const { return cwd; }
        const Architecture &get_architecture(const std::string &) const;
-       const Architecture &get_current_arch() const;
+       const Architecture &get_current_arch() const { return *current_arch; }
+       const Architecture &get_native_arch() const { return *native_arch; }
        const Msp::FS::Path &get_prefix() const { return prefix; }
        const StringList &get_warnings() const { return warnings; }
        void     apply_profile_template(Config &, const std::string &) const;
@@ -97,6 +98,8 @@ private:
        TargetMap    libraries;
 
        ArchMap      archs;
+       Architecture *native_arch;
+       const Architecture *current_arch;
        ProfileTemplateMap profile_tmpl;
 
        ProblemList     problems;
@@ -114,7 +117,6 @@ private:
        bool            conf_only;
        bool            build_all;
        bool            create_makefile;
-       std::string     current_arch;
        Msp::FS::Path   prefix;
        StringList      warnings;