From dbf319f7f91c4e174f57e99dc4d9143ee3403d07 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Wed, 29 Mar 2023 12:31:15 -0700 Subject: [PATCH] output .lib file if available (#43) --- runtime_compile/runtime_compile.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/runtime_compile/runtime_compile.cc b/runtime_compile/runtime_compile.cc index 7274fc4..ca22b94 100644 --- a/runtime_compile/runtime_compile.cc +++ b/runtime_compile/runtime_compile.cc @@ -264,6 +264,18 @@ static void msvc_runtime_compile( }); } } + + auto temp_lib_out = fs::path{temp_out}.replace_extension("lib"); + if(fs::exists(temp_lib_out)) { + auto lib_out = fs::path{options.output_path}.replace_extension("lib"); + fs::rename(temp_lib_out, lib_out, ec); + if(ec) { + options.reporter.report(ecsact_rtb::warning_message{ + .content = "Moving " + temp_lib_out.string() + " to " + + lib_out.string() + " failed. " + ec.message(), + }); + } + } } static void clang_runtime_compile(