]> git.tdb.fi Git - builder.git/blobdiff - source/gnucompiler.cpp
Store a target representing the executable in each tool
[builder.git] / source / gnucompiler.cpp
index 5ecd29307fc9ac8339cc95090dddaf228e6beaed..87fd6623ee91a58ce606d905a95ee8eace56532e 100644 (file)
@@ -17,6 +17,8 @@ GnuCompiler::GnuCompiler(Builder &b, const string &t, const string &n):
        Tool(b, t),
        name(n)
 {
+       executable = builder.get_vfs().find_binary(name);
+
        const Architecture &arch = builder.get_current_arch();
        if(arch.is_native())
                system_path.push_back("/usr/include");
@@ -40,7 +42,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();