// file : build2/cc/link -*- C++ -*- // copyright : Copyright (c) 2014-2016 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #ifndef BUILD2_CC_LINK #define BUILD2_CC_LINK #include #include #include #include #include #include namespace build2 { namespace cc { class link: public rule, virtual common { public: link (data&&); virtual match_result match (action, target&, const string& hint) const; virtual recipe apply (action, target&, const match_result&) const; target_state perform_update (action, target&) const; target_state perform_clean (action, target&) const; private: void append_libraries (strings&, file&, bool, scope&, lorder) const; void hash_libraries (sha256&, file&, bool, scope&, lorder) const; void rpath_libraries (strings&, target&, scope&, lorder, bool) const; // Windows rpath emulation (windows-rpath.cxx). // struct windows_dll { const string& dll; const string* pdb; // NULL if none. string pdb_storage; bool operator< (const windows_dll& y) const {return dll < y.dll;} }; using windows_dlls = std::set; timestamp windows_rpath_timestamp (file&, scope&, lorder) const; windows_dlls windows_rpath_dlls (file&, scope&, lorder) const; void windows_rpath_assembly (file&, scope&, lorder, const string&, timestamp, bool) const; // Windows-specific (windows-manifest.cxx). // path windows_manifest (file&, bool rpath_assembly) const; private: const string rule_id; }; } } #endif // BUILD2_CC_LINK