From ba83ffbaf5941366a399e3bc340bed3f55cc977c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 28 Aug 2016 11:12:02 +0200 Subject: Fix Windows rpath support --- build2/cc/link | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'build2/cc/link') diff --git a/build2/cc/link b/build2/cc/link index 2652285..05f7c5a 100644 --- a/build2/cc/link +++ b/build2/cc/link @@ -5,6 +5,8 @@ #ifndef BUILD2_CC_LINK #define BUILD2_CC_LINK +#include + #include #include @@ -50,7 +52,8 @@ namespace build2 const function&) const; + bool)>&, + bool = false) const; void append_libraries (strings&, file&, bool, scope&, lorder) const; @@ -58,8 +61,32 @@ namespace build2 hash_libraries (sha256&, file&, bool, scope&, lorder) const; void - rpath_libraries (strings&, file&, bool, scope&, lorder, bool) const; + 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; file& resolve_library (name, scope&, -- cgit v1.1