]> git.tdb.fi Git - builder.git/blob - source/gnulinker.h
Redesign GnuLinker to work without subtools
[builder.git] / source / gnulinker.h
1 #ifndef GNULINKER_H_
2 #define GNULINKER_H_
3
4 #include "tool.h"
5
6 class Binary;
7
8 /**
9 The GNU linker.  Turns ObjectFiles into Executables and SharedLibraries.  To
10 create a shared library, specify "shared" as the second argument to
11 create_target.
12
13 Uses either gcc or g++ depending on what was used to compile the object files.
14 */
15 class GnuLinker: public Tool
16 {
17 public:
18         GnuLinker(Builder &, const Architecture &);
19
20         Target *create_target(const std::vector<Target *> &, const std::string &) override;
21         Target *create_install(Target &) const override;
22         std::string create_build_signature(const BuildInfo &) const override;
23 protected:
24         void do_prepare() override;
25 private:
26         static Task *_run(const Binary &);
27 };
28
29 #endif