aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/msvc.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-07 13:54:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-07 13:54:13 +0200
commit3ac9b0bc939bb28d4c0f68fc186572ccde8a9956 (patch)
tree7a8c62fcfaf7cc8997c5ae0487b315adb0647966 /libbuild2/cc/msvc.cxx
parentd377db8740ad51b192cd90959a949878ab8752ee (diff)
Fix bug in MSVC library_type() implementation (GH issue #235)
It looks like the implementation was botched a bit when switching from link.exe /DUMP /ARCHIVEMEMBERS to link.exe /LIB /LIST.
Diffstat (limited to 'libbuild2/cc/msvc.cxx')
-rw-r--r--libbuild2/cc/msvc.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/libbuild2/cc/msvc.cxx b/libbuild2/cc/msvc.cxx
index 23fb87b..9139891 100644
--- a/libbuild2/cc/msvc.cxx
+++ b/libbuild2/cc/msvc.cxx
@@ -471,14 +471,11 @@ namespace build2
// libhello\hello.lib.obj
// hello-0.1.0-a.0.19700101000000.dll
//
- // Archive member name at 746: [...]hello.dll[/][ ]*
- // Archive member name at 8C70: [...]hello.lib.obj[/][ ]*
- //
size_t n (s.size ());
for (; n != 0 && s[n - 1] == ' '; --n) ; // Skip trailing spaces.
- if (n >= 7) // At least ": X.obj" or ": X.dll".
+ if (n >= 5) // At least "X.obj" or "X.dll".
{
n -= 4; // Beginning of extension.