X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=3236631d756d69b10a0fc0172b4f580972d0a863;hb=edd4771292a2273080fbcbac266c6831834b0b86;hp=0c5f2f8611db9eb588b8649fe3867f313153c5fc;hpb=b29b79ca42fe4285c18b5d348b4eb59010d2c2da;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 0c5f2f8..3236631 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -6,7 +6,6 @@ #include "builder.h" #include "component.h" #include "csourcefile.h" -#include "externaltask.h" #include "gnucompiler.h" #include "objcsourcefile.h" #include "objectfile.h" @@ -50,7 +49,7 @@ GnuCompiler::GnuCompiler(Builder &b, const Architecture &a, const string &t): throw invalid_argument("GnuCompiler::GnuCompiler"); set_command((tag=="CXX" ? "g++" : "gcc"), true); - set_run(_run); + set_run_external(_run); } Target *GnuCompiler::create_source(const Component &comp, const FS::Path &path) const @@ -213,7 +212,7 @@ unsigned GnuCompiler::query_version(const string &exe_path, const string &arg) c return ver; } -Task *GnuCompiler::_run(const ObjectFile &object) +ExternalTask::Arguments GnuCompiler::_run(const ObjectFile &object, FS::Path &work_dir) { const Tool &tool = *object.get_tool(); const Architecture &arch = *tool.get_architecture(); @@ -345,11 +344,10 @@ Task *GnuCompiler::_run(const ObjectFile &object) FS::Path obj_path = object.get_path(); FS::Path src_path = object.get_source().get_path(); - 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()); argv.push_back(relative(src_path, work_dir).str()); - return new ExternalTask(argv, work_dir); + return argv; }