]> git.tdb.fi Git - builder.git/blob - source/gnulinker.h
Mark overridden virtual functions as such
[builder.git] / source / gnulinker.h
1 #ifndef GNULINKER_H_
2 #define GNULINKER_H_
3
4 #include "tool.h"
5
6 /**
7 The GNU linker.  Turns ObjectFiles into Executables and SharedLibraries.  To
8 create a shared library, specify "shared" as the second argument to
9 create_target.
10
11 Uses either gcc or g++ depending on what was used to compile the object files.
12 */
13 class GnuLinker: public Tool
14 {
15 private:
16         class Linker: public SubTool
17         {
18         private:
19                 std::string compiler_tag;
20
21         public:
22                 Linker(GnuLinker &, const std::string &);
23
24                 std::string create_build_signature(const BuildInfo &) const override;
25         private:
26                 void do_prepare() override;
27         public:
28                 Task *run(const Target &) const override;
29         };
30
31         Linker *default_linker;
32         Linker *cxx_linker;
33
34 public:
35         GnuLinker(Builder &, const Architecture &);
36         ~GnuLinker();
37
38         Target *create_target(const std::list<Target *> &, const std::string &) override;
39         Target *create_install(Target &) const override;
40 protected:
41         void do_prepare() override;
42 public:
43         Task *run(const Target &) const override;
44 };
45
46 #endif