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<path>` option where `<path>` points to GCC/Clang specific headers. Reported by Jeff Hostetler in https://github.com/microsoft/git/issues/275. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jun 4, 2020 at 21:09 UTC
bb0e43d8a1ae8489071573c5323c28ed2935a354
1 file changed
+3
-1
compat/vcbuild/scripts/clink.pl
+3
-1
@@ -23,7 +23,9 @@ while (@ARGV) {
23
# before any "-l*" flags.
24
$is_debug = 1;
25
}
26
- if ("$arg" =~ /^-[DIMGOZ]/) {
26
+ if ("$arg" =~ /^-I\/mingw(32|64)/) {
27
+ # eat
28
+ } elsif ("$arg" =~ /^-[DIMGOZ]/) {
29
push(@cflags, $arg);
30
} elsif ("$arg" eq "-o") {
31
my $file_out = shift @ARGV;