set_command("ar", true);
input_suffixes.push_back(".o");
processing_unit = COMPONENT;
+ set_run(_run);
}
Target *GnuArchiver::create_target(const vector<Target *> &sources, const string &)
return lib;
}
-Task *GnuArchiver::run(const Target &target) const
+Task *GnuArchiver::_run(const StaticLibrary &lib)
{
- const StaticLibrary &lib = dynamic_cast<const StaticLibrary &>(target);
+ const Tool &tool = *lib.get_tool();
const Component &comp = *lib.get_component();
vector<string> argv;
- argv.push_back(executable->get_path().str());
+ argv.push_back(tool.get_executable()->get_path().str());
argv.push_back("rc");
FS::Path work_dir = comp.get_package().get_source_directory();