X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnulinker.h;h=6bd11ca441afda7f4be2e275d4ce80862894de2e;hb=b067981c0da0c1a4616ed175d0ce8ac5564cbdbf;hp=626894433505a10f2f959ad4b2544694a63d0ed6;hpb=338eefb513953ae55e8e3614c009c242ba8ad74e;p=builder.git diff --git a/source/gnulinker.h b/source/gnulinker.h index 6268944..6bd11ca 100644 --- a/source/gnulinker.h +++ b/source/gnulinker.h @@ -3,10 +3,31 @@ #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 + { + public: + Linker(GnuLinker &, const std::string &); + + virtual Target *create_target(const std::list &, const std::string &) const; + virtual Task *run(const Target &) const; + }; + + Linker *default_linker; + Linker *cxx_linker; + public: - GnuLinker(Builder &); + GnuLinker(Builder &, const Architecture &); + ~GnuLinker(); virtual Target *create_target(const std::list &, const std::string &) const; virtual Task *run(const Target &) const;