From 195de65a84864cf5931325eeb2356f7d98155055 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Jun 2021 11:59:04 +0200 Subject: Add support for automatic generation of symbol exporting .def file --- libbuild2/cc/link-rule.hxx | 4 +--- libbuild2/cc/msvc.cxx | 11 ++++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'libbuild2/cc') 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 - #include #include @@ -262,7 +260,7 @@ namespace build2 bool operator< (const windows_dll& y) const {return dll < y.dll;} }; - using windows_dlls = std::set; + using windows_dlls = set; 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" << -- cgit v1.1