#include "tool.h"
+class Binary;
+
+/**
+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
{
public:
- GnuLinker(Builder &);
+ GnuLinker(Builder &, const Architecture &);
- virtual Target *create_target(const std::list<Target *> &, const std::string &) const;
- virtual Task *run(const Target &) const;
+ Target *create_target(const std::vector<Target *> &, const std::string &) override;
+ Target *create_install(Target &) const override;
+ std::string create_build_signature(const BuildInfo &) const override;
+protected:
+ void do_prepare(ToolData &) const override;
+private:
+ static Task *_run(const Binary &);
};
#endif