]> git.tdb.fi Git - builder.git/blobdiff - source/builder.h
Add gcc's private library directory to ClangLinker's system path
[builder.git] / source / builder.h
index b7b0b78b407e4445a1f354b74e08d7571f3a9aaf..e06cec34e73c6efbea21f1dee7a5839d15ef7e96 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef BUILDER_H_
 #define BUILDER_H_
 
-#include <list>
 #include <map>
 #include <string>
 #include <msp/datafile/loader.h>
@@ -48,19 +47,20 @@ private:
        PackageManager package_manager;
 
        Architecture native_arch;
-       Architecture *current_arch;
+       Architecture *current_arch = 0;
        std::map<std::string, BuildType> build_types;
-       BuildType *build_type;
+       BuildType *build_type = 0;
        Toolchain toolchain;
        VirtualFileSystem vfs;
        BuildGraph build_graph;
        Logger default_logger;
        const Logger *logger;
 
+       bool auto_prefix = true;
        Msp::FS::Path prefix;
-       Msp::FS::Path tempdir;
+       Msp::FS::Path tempdir = "temp";
 
-       Loader *top_loader;
+       Loader *top_loader = 0;
 
 public:
        Builder();
@@ -80,13 +80,17 @@ public:
        const Msp::FS::Path &get_prefix() const { return prefix; }
        const Msp::FS::Path &get_temp_directory() const { return tempdir; }
 
+private:
+       void update_auto_prefix();
+
+public:
        void add_default_tools();
        const Toolchain &get_toolchain() const { return toolchain; }
        VirtualFileSystem &get_vfs() { return vfs; }
        void set_logger(const Logger *);
        const Logger &get_logger() const { return *logger; }
 
-       std::list<std::string> collect_problems() const;
+       std::vector<std::string> collect_problems() const;
 
        /** Loads a build file.  If opts is not null, it is used to configure any
        packages loaded from this file.  If all is true, external packages are also