Task *GnuCompiler::run(const Target &target) const
{
const ObjectFile &object = dynamic_cast<const ObjectFile &>(target);
- const Component &comp = *object.get_component();
ExternalTask::Arguments argv;
argv.push_back(executable->get_path().str());
FS::Path obj_path = object.get_path();
FS::Path src_path = object.get_source().get_path();
- FS::Path work_dir = comp.get_package().get_source_directory();
+ FS::Path work_dir = object.get_component()->get_package().get_source_directory();
argv.push_back("-o");
argv.push_back(relative(obj_path, work_dir).str());