aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-03-20 11:37:46 +0100
committerJunio C Hamano <gitster@pobox.com>2025-03-21 04:11:15 -0700
commit871491f7ade026a198af054633ebfeecf23c44fe (patch)
treed61b45a682006fcf81311bc9fdcfd2c59524e9ae
parentA bit more updates after -rc2 (diff)
downloadgit-871491f7ade026a198af054633ebfeecf23c44fe.tar.gz
git-871491f7ade026a198af054633ebfeecf23c44fe.zip
meson: fix compat sources when compiling with MSVC
In our compat library we have both "msvc.c" and "mingw.c". The former is mostly a thin wrapper around the latter as it directly includes it, but it has a couple of extra headers that aren't included in "mingw.c" and is expected to be used with the Visual Studio compiler toolchain. While our Makefile knows to pick up the correct file depending on whether or not the Visual Studio toolchain is used, we don't do the same with Meson. Fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--meson.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index efe2871c9d..2cf9da3474 100644
--- a/meson.build
+++ b/meson.build
@@ -1107,7 +1107,6 @@ if host_machine.system() == 'cygwin'
]
elif host_machine.system() == 'windows'
libgit_sources += [
- 'compat/mingw.c',
'compat/winansi.c',
'compat/win32/dirent.c',
'compat/win32/flush.c',
@@ -1134,6 +1133,9 @@ elif host_machine.system() == 'windows'
libgit_include_directories += 'compat/win32'
if compiler.get_id() == 'msvc'
libgit_include_directories += 'compat/vcbuild/include'
+ libgit_sources += 'compat/msvc.c'
+ else
+ libgit_sources += 'compat/mingw.c'
endif
endif