+Tool::Tool(Builder &b, const Architecture &a, const string &t):
+ builder(b),
+ architecture(&a),
+ tag(t),
+ executable(0),
+ prepared(false)
+{ }
+
+void Tool::set_command(const string &cmd, bool cross)
+{
+ if(cmd.empty())
+ throw invalid_argument("Tool::set_command");
+
+ if(cross && architecture->is_cross())
+ command = format("%s-%s", architecture->get_cross_prefix(), cmd);
+ else
+ command = cmd;
+}
+