From b0fa428765e1dc444be0b082c82aee71ac42b3e5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 4 Jun 2020 16:24:01 +0200 Subject: [PATCH] msvc: fix "REG_STARTEND" issue In 897d68e7af82 (Makefile: use curl-config --cflags, 2020-03-26), we taught the build process to use `curl-config --cflags` to make sure that it can find cURL's headers. In the MSVC build, this is completely bogus because we're running in a Git for Windows SDK whose `curl-config` supports the _GCC_ build. Let's just ignore each and every `-I` option where `` points to GCC/Clang specific headers. Reported by Jeff Hostetler in https://github.com/microsoft/git/issues/275. Signed-off-by: Johannes Schindelin --- compat/vcbuild/scripts/clink.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl index d6959a8441d794..8eb4d9cda462ba 100755 --- a/compat/vcbuild/scripts/clink.pl +++ b/compat/vcbuild/scripts/clink.pl @@ -23,7 +23,9 @@ # before any "-l*" flags. $is_debug = 1; } - if ("$arg" =~ /^-[DIMGOZ]/) { + if ("$arg" =~ /^-I\/mingw(32|64)/) { + # eat + } elsif ("$arg" =~ /^-[DIMGOZ]/) { push(@cflags, $arg); } elsif ("$arg" eq "-o") { my $file_out = shift @ARGV;