X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=5209317dc0fd4b544bfc66b292c6beebd77080d6;hb=d6e5645659cc31231e6da5028ddd0e0aeca19218;hp=5ecd29307fc9ac8339cc95090dddaf228e6beaed;hpb=ca18323d45d67243773b03668e79c715aa976441;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 5ecd293..5209317 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -14,9 +14,10 @@ using namespace std; using namespace Msp; GnuCompiler::GnuCompiler(Builder &b, const string &t, const string &n): - Tool(b, t), - name(n) + Tool(b, t) { + executable = builder.get_vfs().find_binary(n); + const Architecture &arch = builder.get_current_arch(); if(arch.is_native()) system_path.push_back("/usr/include"); @@ -24,7 +25,7 @@ GnuCompiler::GnuCompiler(Builder &b, const string &t, const string &n): system_path.push_back("/usr/"+arch.get_cross_prefix()+"/include"); } -Target *GnuCompiler::create_target(const list &sources, const std::string &) const +Target *GnuCompiler::create_target(const list &sources, const string &) const { if(sources.size()!=1) throw invalid_argument("GnuCCompiler::create_target"); @@ -40,7 +41,7 @@ Task *GnuCompiler::run(const Target &target) const const Component &comp = object.get_component(); ExternalTask::Arguments argv; - argv.push_back(name); + argv.push_back(executable->get_path().str()); argv.push_back("-c"); const BuildInfo &binfo = comp.get_build_info();