X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnulinker.h;h=872234a6d33d645a36676309172c4c58e948a15d;hb=82f1175238a94618b0cf1485b0132fb965996843;hp=626894433505a10f2f959ad4b2544694a63d0ed6;hpb=338eefb513953ae55e8e3614c009c242ba8ad74e;p=builder.git diff --git a/source/gnulinker.h b/source/gnulinker.h index 6268944..872234a 100644 --- a/source/gnulinker.h +++ b/source/gnulinker.h @@ -3,12 +3,40 @@ #include "tool.h" +/** +The GNU linker. Turns ObjectFiles into Executables and SharedLibraries. To +create a shared library, specify "shared" as the second argument to +create_target. + +Uses either gcc or g++ depending on what was used to compile the object files. +*/ class GnuLinker: public Tool { +private: + class Linker: public SubTool + { + private: + std::string compiler_tag; + + public: + Linker(GnuLinker &, const std::string &); + + virtual std::string create_build_signature(const BuildInfo &) const; + private: + virtual void do_prepare(); + public: + virtual Task *run(const Target &) const; + }; + + Linker *default_linker; + Linker *cxx_linker; + public: - GnuLinker(Builder &); + GnuLinker(Builder &, const Architecture &, const Msp::FS::Path & = Msp::FS::Path()); + ~GnuLinker(); - virtual Target *create_target(const std::list &, const std::string &) const; + virtual Target *create_target(const std::list &, const std::string &); + virtual Target *create_install(Target &) const; virtual Task *run(const Target &) const; };