diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-21 11:59:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-21 11:59:04 +0200 |
commit | 195de65a84864cf5931325eeb2356f7d98155055 (patch) | |
tree | 4ba33483d9032acb3de82547d5e9e0307a3c8353 /libbuild2/cc | |
parent | d822a0ae2c9fe312ad7a31e829ce2951be6a3ea0 (diff) |
Add support for automatic generation of symbol exporting .def file
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/link-rule.hxx | 4 | ||||
-rw-r--r-- | libbuild2/cc/msvc.cxx | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/libbuild2/cc/link-rule.hxx b/libbuild2/cc/link-rule.hxx index c68466a..c761d53 100644 --- a/libbuild2/cc/link-rule.hxx +++ b/libbuild2/cc/link-rule.hxx @@ -4,8 +4,6 @@ #ifndef LIBBUILD2_CC_LINK_RULE_HXX #define LIBBUILD2_CC_LINK_RULE_HXX -#include <set> - #include <libbuild2/types.hxx> #include <libbuild2/utility.hxx> @@ -262,7 +260,7 @@ namespace build2 bool operator< (const windows_dll& y) const {return dll < y.dll;} }; - using windows_dlls = std::set<windows_dll>; + using windows_dlls = set<windows_dll>; timestamp windows_rpath_timestamp (const file&, diff --git a/libbuild2/cc/msvc.cxx b/libbuild2/cc/msvc.cxx index cceb1fe..9e8ae18 100644 --- a/libbuild2/cc/msvc.cxx +++ b/libbuild2/cc/msvc.cxx @@ -426,6 +426,7 @@ namespace build2 bool obj (false), dll (false); string s; + bool io (false); try { ifdstream is ( @@ -465,14 +466,18 @@ namespace build2 } } } + + is.close (); } catch (const io_error&) { - // Presumably the child process failed. Let run_finish() deal with - // that. + // Presumably the child process failed so let run_finish() deal with + // that first. + // + io = true; } - if (!run_finish_code (args, pr, s)) + if (!run_finish_code (args, pr, s) || io) { diag_record dr; dr << warn << "unable to detect " << l << " library type, ignoring" << |