]> git.tdb.fi Git - builder.git/blob - source/gnucompiler.h
Mark overridden virtual functions as such
[builder.git] / source / gnucompiler.h
1 #ifndef GNUCOMPILER_H_
2 #define GNUCOMPILER_H_
3
4 #include "tool.h"
5
6 /**
7 Common base class for GNU compilers.  Turns SourceFiles into ObjectFiles.
8
9 Since invocation is mostly the same for all language frontends, most of the
10 logic is here and the individual tools only handle creating source files of
11 appropriate type.
12 */
13 class GnuCompiler: public Tool
14 {
15 protected:
16         unsigned version;
17
18 public:
19         GnuCompiler(Builder &, const Architecture &, const std::string &);
20
21         Target *create_source(const Component &, const Msp::FS::Path &) const override;
22         Target *create_source(const Msp::FS::Path &) const override;
23         Target *create_target(const std::list<Target *> &, const std::string &) override;
24         std::string create_build_signature(const BuildInfo &) const override;
25 protected:
26         void do_prepare() override;
27         void prepare_syspath();
28         void prepare_version();
29         void prepare_version(const std::string &);
30 public:
31         Task *run(const Target &) const override;
32 };
33
34 #endif