2 #include "customizedtool.h"
8 CustomizedTool::CustomizedTool(Builder &b, const std::string &t, const Architecture &a):
9 CustomizedTool(b.get_toolchain().get_tool(t), a)
12 CustomizedTool::CustomizedTool(Tool &t, const Architecture &a):
13 Tool(t.get_builder(), &a, t.get_tag()),
16 input_suffixes = parent.get_input_suffixes();
17 aux_suffixes = parent.get_auxiliary_suffixes();
18 processing_unit = parent.get_processing_unit();
20 set_run([this](const Target &tgt){ return parent.run(tgt); });
23 Target *CustomizedTool::create_source(const Component &c, const FS::Path &p) const
25 return parent.create_source(c, p);
28 Target *CustomizedTool::create_source(const FS::Path &p) const
30 return parent.create_source(p);
33 Target *CustomizedTool::create_target(const vector<Target *> &s, const string &a)
35 Target *target = parent.create_target(s, a);
36 target->set_tool(*this);
40 Target *CustomizedTool::create_install(Target &t) const
42 return parent.create_install(t);
45 string CustomizedTool::create_build_signature(const BuildInfo &bi) const
47 string sig = Tool::create_build_signature(bi);
48 string parent_sig = parent.create_build_signature(bi);
49 string::size_type comma = parent_sig.find(',');
50 if(comma==string::npos)
53 return sig+parent_sig.substr(comma);
56 void CustomizedTool::do_prepare(ToolData &tool) const
58 parent.prepare(static_cast<Tool &>(tool));