protected:
Builder &builder;
- const Architecture *architecture;
+ const Architecture *architecture = 0;
std::string tag;
std::string command;
- FileTarget *executable;
+ FileTarget *executable = 0;
std::vector<std::string> input_suffixes;
std::vector<std::string> aux_suffixes;
- ProcessingUnit processing_unit;
+ ProcessingUnit processing_unit = ONE_FILE;
VirtualFileSystem::SearchPath system_path;
BuildInfo build_info;
- bool prepared;
+ bool prepared = false;
std::vector<std::string> problems;
- Tool(Builder &, const std::string &);
- Tool(Builder &, const Architecture &, const std::string &);
+ Tool(Builder &b, const std::string &t): Tool(b, 0, t) { }
+ Tool(Builder &b, const Architecture &a, const std::string &t): Tool(b, &a, t) { }
+private:
+ Tool(Builder &b, const Architecture *a, const std::string &t): builder(b), architecture(a), tag(t) { }
public:
virtual ~Tool() { }
const std::string &get_tag() const { return tag; }
- /** Returns the architecture this tool build for. May return null if the
+ /** Returns the architecture this tool builds for. May return null if the
tool is architecture-agnostic. */
const Architecture *get_architecture() const { return architecture; }
protected:
Tool &parent;
- SubTool(Tool &);
+ SubTool(Tool &t): Tool(t), parent(t) { }
public:
Target *create_source(const Component &, const Msp::FS::Path &) const override;