]> git.tdb.fi Git - builder.git/blob - source/gnulinker.h
Track build options to rebuild primary targets when build type changes
[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         public:
19                 Linker(GnuLinker &, const std::string &);
20
21                 virtual Target *create_target(const std::list<Target *> &, const std::string &) const;
22                 virtual std::string create_build_signature(const BuildInfo &) const;
23                 virtual Task *run(const Target &) const;
24         };
25
26         Linker *default_linker;
27         Linker *cxx_linker;
28
29 public:
30         GnuLinker(Builder &, const Architecture &);
31         ~GnuLinker();
32
33         virtual Target *create_target(const std::list<Target *> &, const std::string &) const;
34         virtual Task *run(const Target &) const;
35 };
36
37 #endif