]> git.tdb.fi Git - builder.git/blob - plugins/clang/clanglinker.cpp
Rearrange sources into subdirectories
[builder.git] / plugins / clang / clanglinker.cpp
1 #include <msp/builder/builder.h>
2 #include <msp/fs/stat.h>
3 #include "clanglinker.h"
4
5 using namespace Msp;
6
7 ClangLinker::ClangLinker(Builder &b, const Architecture &a):
8         CustomizedTool(b, "LINK", a)
9 {
10         set_command("clang", true);
11 }
12
13 void ClangLinker::do_prepare(ToolData &tool) const
14 {
15         parent.prepare();
16         CustomizedTool::do_prepare(tool);
17         for(const FS::Path &p: parent.get_system_path())
18                 if(FS::exists(p/"libstdc++.so"))
19                 {
20                         builder.get_logger().log("tools", "Got %s gcc system path: %s", static_cast<const Tool &>(tool).get_tag(), p);
21                         tool.system_path.push_back(p);
22                         break;
23                 }
24 }