-string GnuLinker::Linker::create_build_signature(const BuildInfo &binfo) const
-{
- string result = FS::basename(executable->get_path());
- result += ',';
- if(binfo.libmode<=BuildInfo::STATIC)
- result += 't';
- else
- result += 'd';
- if(binfo.strip)
- result += 's';
- if(!binfo.libs.empty())
- {
- result += ",l";
- result += join(binfo.libs.begin(), binfo.libs.end(), ",l");
- }
- return result;
-}
-
-void GnuLinker::Linker::do_prepare()
-{
- Tool &compiler = builder.get_toolchain().get_tool(compiler_tag);
- if(dynamic_cast<GnuCompiler *>(&compiler))
- {
- compiler.prepare();
- executable = compiler.get_executable();
- }
-}
-
-Task *GnuLinker::Linker::run(const Target &target) const
-{
- const Binary &bin = dynamic_cast<const Binary &>(target);
-
- vector<string> argv;
- argv.push_back(executable->get_path().str());