]> git.tdb.fi Git - builder.git/blobdiff - source/gnuarchiver.cpp
Store a target representing the executable in each tool
[builder.git] / source / gnuarchiver.cpp
index 4916408e312607e840cfc9314bc3ee8061b6e760..13b2054ff5f26d2ea9006b3513d17e924b28faf9 100644 (file)
@@ -16,6 +16,8 @@ using namespace Msp;
 GnuArchiver::GnuArchiver(Builder &b):
        Tool(b, "AR")
 {
+       executable = builder.get_vfs().find_binary("ar");
+
        input_suffixes.push_back(".o");
 }
 
@@ -45,7 +47,7 @@ Task *GnuArchiver::run(const Target &target) const
        const Component &comp = *lib.get_component();
 
        vector<string> argv;
-       argv.push_back("ar");
+       argv.push_back(executable->get_path().str());
        argv.push_back("rc");
 
        FS::Path work_dir = comp.get_package().get_source();