#include <msp/core/environ.h>
#include <msp/fs/utils.h>
-#include <msp/strings/format.h>
#include <msp/strings/utils.h>
#include "builder.h"
#include "component.h"
set_command((ms_tools.get_vc_bin_dir()/"link.exe").str(), false);
}
-Target *MsvcLinker::create_target(const list<Target *> &sources, const string &arg)
+Target *MsvcLinker::create_target(const vector<Target *> &sources, const string &arg)
{
if(sources.empty())
throw invalid_argument("MsvcLinker::create_target");
- list<ObjectFile *> objs;
+ vector<ObjectFile *> objs;
+ objs.reserve(sources.size());
for(Target *s: sources)
- {
- if(ObjectFile *obj = dynamic_cast<ObjectFile *>(s))
- objs.push_back(obj);
- else
- throw invalid_argument("MsvcLinker::create_target");
- }
+ objs.push_back(&dynamic_cast<ObjectFile &>(*s));
const Component &comp = *objs.front()->get_component();
Binary *bin = 0;
string MsvcLinker::create_build_signature(const BuildInfo &binfo) const
{
- string result = FS::basename(executable->get_path());
+ string result = Tool::create_build_signature(binfo);
result += ',';
if(binfo.strip)
result += 's';
for(const FS::Path &p: system_path)
{
append(path, ";", p.str());
- builder.get_logger().log("tools", format("Got %s system path: %s", tag, p));
+ builder.get_logger().log("tools", "Got %s system path: %s", tag, p);
}
setenv("LIB", path);