From: Johannes Schindelin Date: Mon, 29 Jul 2019 20:08:11 +0000 (-0700) Subject: contrib/buildsystems: handle options starting with a slash X-Git-Tag: v2.23.0-rc1~2^2~7 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=commitdiff_plain;h=4553f9de23f8d451bf801b566247bf987570626a contrib/buildsystems: handle options starting with a slash With the recent changes to allow building with MSVC=1, we now pass the /OPT:REF option to the compiler. This confuses the parser that wants to turn the output of a dry run into project definitions for QMake and Visual Studio: Unhandled link option @ line 213: /OPT:REF at [...] Let's just extend the code that passes through options that start with a dash, so that it passes through options that start with a slash, too. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl index 9bde7ae15b..8bb07e8e25 100755 --- a/contrib/buildsystems/engine.pl +++ b/contrib/buildsystems/engine.pl @@ -351,7 +351,7 @@ sub handleLinkLine push(@libs, "expat.lib"); } elsif ("$part" eq "-liconv") { push(@libs, "libiconv.lib"); - } elsif ($part =~ /^-/) { + } elsif ($part =~ /^[-\/]/) { push(@lflags, $part); } elsif ($part =~ /\.(a|lib)$/) { $part =~ s/\.a$/.lib/;