]> git.tdb.fi Git - builder.git/blob - plugins/gnu/gnucompiler.h
572e376fa354b9e24451b0b5d33b056a0a32fbc5
[builder.git] / plugins / gnu / gnucompiler.h
1 #ifndef GNUCOMPILER_H_
2 #define GNUCOMPILER_H_
3
4 #include <msp/builder/tool.h>
5
6 class ObjectFile;
7
8 /**
9 The GNU compiler.  Can be created with different tags for different languages.
10 Turns SourceFiles into ObjectFiles.
11 */
12 class GnuCompiler: public Tool
13 {
14 public:
15         GnuCompiler(Builder &, const Architecture &, const std::string &);
16
17         Target *create_source(const Component &, const Msp::FS::Path &) const override;
18         Target *create_source(const Msp::FS::Path &) const override;
19         Target *create_target(const std::vector<Target *> &, const std::string &) override;
20         std::string create_build_signature(const BuildInfo &) const override;
21 protected:
22         void do_prepare(ToolData &) const override;
23         void prepare_syspath(ToolData &) const;
24         void prepare_version(ToolData &) const;
25         unsigned query_version(const std::string &, const std::string &) const;
26
27 private:
28         static ExternalTask::Arguments _run(const ObjectFile &, Msp::FS::Path &);
29 };
30
31 #endif