From 9d873b63913eb7e471952caedc15bdeaafa4f391 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 6 Oct 2017 02:07:54 +0300 Subject: Fix old libs cleanup not to remove unrelated files --- build2/cc/link.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'build2') diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx index 4ab2873..e14cb08 100644 --- a/build2/cc/link.cxx +++ b/build2/cc/link.cxx @@ -257,7 +257,6 @@ namespace build2 } append_ext (cp); - cp += "*"; // For .d, .pdb, etc. A bit dangerous though. // On Windows the real path is to libs{} and the link path is to the // import library. @@ -1833,7 +1832,7 @@ namespace build2 if (verb >= 4) // Seeing this with -V doesn't really add any value. text << "rm " << p; - auto rm = [&paths] (path&& m, const string&, bool interm) + auto rm = [&paths, this] (path&& m, const string&, bool interm) { if (!interm) { @@ -1852,6 +1851,13 @@ namespace build2 test (paths.link)) { try_rmfile (m); + try_rmfile (m + ".d"); + + if (tsys == "win32-msvc") + { + try_rmfile (m + ".pdb"); + try_rmfile (m + ".ilk"); + } } } return true; -- cgit v1.1