]> git.tdb.fi Git - builder.git/blobdiff - source/gnuarchiver.cpp
Store problems at their source rather than globally
[builder.git] / source / gnuarchiver.cpp
index 7482b0d17caf004d66125f4a82c8c098d0bb2331..cc4359e90071235a57df19c0ac59a3a58fd12088 100644 (file)
@@ -1,7 +1,6 @@
 #include <msp/fs/dir.h>
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
-#include <msp/strings/format.h>
 #include <stdexcept>
 #include "builder.h"
 #include "component.h"
@@ -42,10 +41,7 @@ Target *GnuArchiver::create_target(const list<Target *> &sources, const string &
 
 void GnuArchiver::do_prepare()
 {
-       string command = "ar";
-       if(architecture->is_cross())
-               command = format("%s-%s", architecture->get_cross_prefix(), command);
-       executable = builder.get_vfs().find_binary(command);
+       set_executable("ar", true);
 }
 
 Task *GnuArchiver::run(const Target &target) const