]> git.tdb.fi Git - builder.git/commitdiff
Add a customized linker tool to ClangTools
authorMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:11:11 +0000 (18:11 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 27 Dec 2022 16:31:00 +0000 (18:31 +0200)
Also remove the GnuArchiver from it, beacuse the GNU and clang toolchains
can now be active at the same time.

source/clanglinker.cpp [new file with mode: 0644]
source/clanglinker.h [new file with mode: 0644]
source/clangtools.cpp

diff --git a/source/clanglinker.cpp b/source/clanglinker.cpp
new file mode 100644 (file)
index 0000000..9d39979
--- /dev/null
@@ -0,0 +1,7 @@
+#include "clanglinker.h"
+
+ClangLinker::ClangLinker(Builder &b, const Architecture &a):
+       CustomizedTool(b, "LINK", a)
+{
+       set_command("clang", true);
+}
diff --git a/source/clanglinker.h b/source/clanglinker.h
new file mode 100644 (file)
index 0000000..fd7e264
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef CLANGLINKER_H_
+#define CLANGLINKER_H_
+
+#include "customizedtool.h"
+
+class ClangLinker: public CustomizedTool
+{
+public:
+       ClangLinker(Builder &, const Architecture &);
+};
+
+#endif
index 80968a71cd18dead38e6de5ff1bd0c6e1c50c58d..8e8973db5450b2d90fbf8a8542c83f2172a83f01 100644 (file)
@@ -1,8 +1,7 @@
-#include "builder.h"
+#include "architecture.h"
 #include "clangcompiler.h"
+#include "clanglinker.h"
 #include "clangtools.h"
-#include "gnuarchiver.h"
-#include "gnulinker.h"
 
 using namespace std;
 
@@ -13,8 +12,7 @@ ClangTools::ClangTools(Builder &builder, const Architecture &arch):
        add_tool(new ClangCompiler(builder, arch, "CXX"));
        add_tool(new ClangCompiler(builder, arch, "OBJC"));
 
-       add_tool(new GnuLinker(builder, arch));
-       add_tool(new GnuArchiver(builder, arch));
+       add_tool(new ClangLinker(builder, arch));
 }
 
 int ClangTools::get_priority(const Architecture &arch)