msvc: fix "REG_STARTEND" issue
diff mbox series

Message ID
State New
Headers show
  • msvc: fix "REG_STARTEND" issue
Related show

Commit Message

Han-Wen Nienhuys via GitGitGadget June 4, 2020, 9:09 p.m. UTC
From: Johannes Schindelin <>

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<path>` option where `<path>` points
to GCC/Clang specific headers.

Reported by Jeff Hostetler in

Signed-off-by: Johannes Schindelin <>
    msvc: fix "REG_STARTEND" issue
    The MSVC build is actually not tested in our CI/PR builds, that's how
    this regression could creep in.

Fetch-It-Via: git fetch pr-648/dscho/fix-msvc-build-git-v1

 compat/vcbuild/scripts/ | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

base-commit: 20514004ddf1a3528de8933bc32f284e175e1012

diff mbox series

diff --git a/compat/vcbuild/scripts/ b/compat/vcbuild/scripts/
index d9f71b7cbb7..61ad084a7b7 100755
--- a/compat/vcbuild/scripts/
+++ b/compat/vcbuild/scripts/
@@ -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;