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/msvc.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libbuild2/cc/msvc.cxx') 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