Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5a4d746
Merge branch 'es/meson-build-skip-coccinelle' into kn/meson-hdr-check
gitster Apr 8, 2025
6547d1c
bswap.h: add support for built-in bswap functions
dennisameling Apr 23, 2025
cd6229b
config.mak.uname: add support for clangarm64
dennisameling Apr 23, 2025
734bf24
mingw: do not use nedmalloc on Windows/ARM64
dscho Apr 23, 2025
8945fba
msvc: do handle builds on Windows/ARM64
dscho Apr 23, 2025
619950d
mingw(arm64): do move the `/etc/git*` location
dscho Apr 23, 2025
436a422
max_tree_depth: lower it for clangarm64 on Windows
dscho Apr 23, 2025
a064b0b
ci/github: install git before checking out the repository
KarthikNayak Apr 23, 2025
8e980b7
coccinelle: meson: rename variables to be more specific
KarthikNayak Apr 23, 2025
1597b6e
meson: move headers definition from 'contrib/coccinelle'
KarthikNayak Apr 23, 2025
7e873eb
meson: rename 'third_party_sources' to 'third_party_excludes'
KarthikNayak Apr 23, 2025
02a1326
meson: add support for 'hdr-check'
KarthikNayak Apr 23, 2025
04a13ed
makefile/meson: add 'check-headers' as alias for 'hdr-check'
KarthikNayak Apr 23, 2025
61fb226
meson: simplify and parameterize various standard function checks
eli-schwartz Apr 25, 2025
945090d
meson: check for getpagesize before using it
eli-schwartz Apr 25, 2025
f5e3c6c
meson: do a full usage-based compile check for sysinfo
eli-schwartz Apr 25, 2025
5cb05d7
meson: add a couple missing networking dependencies
eli-schwartz Apr 25, 2025
2b83df3
meson: fix typo in function check that prevented checking for hstrerror
eli-schwartz Apr 25, 2025
d380dfe
meson: only check for missing networking syms on non-Windows; add com…
eli-schwartz Apr 25, 2025
5a6b9c8
t/perf: fix benchmarks with alternate repo formats
pks-t Apr 28, 2025
d84b990
t/perf: use configured PERL_PATH
pks-t Apr 28, 2025
5756ccd
t/perf: fix benchmarks with out-of-tree builds
pks-t Apr 28, 2025
d84eefa
meson: wire up benchmarks
pks-t Apr 28, 2025
c3fc5c6
meson: wire up benchmarking options
pks-t Apr 28, 2025
b50795d
Merge branch 'js/windows-arm64'
gitster May 5, 2025
cc14ba6
Merge branch 'ps/meson-build-perf-bench'
gitster May 5, 2025
cbda078
Merge branch 'es/meson-cleanup'
gitster May 5, 2025
791db2c
Merge branch 'kn/meson-hdr-check'
gitster May 5, 2025
6f84262
The eleventh batch
gitster May 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,20 @@ jobs:
- name: prepare libc6 for actions
if: matrix.vector.jobname == 'linux32'
run: apt -q update && apt -q -y install libc6-amd64 lib64stdc++6
- name: install git in container
run: |
if command -v git
then
: # nothing to do
elif command -v apk
then
apk add --update git
elif command -v dnf
then
dnf -yq update && dnf -yq install git
else
apt-get -q update && apt-get -q -y install git
fi
- uses: actions/checkout@v4
- run: ci/install-dependencies.sh
- run: useradd builder --create-home
Expand Down
10 changes: 10 additions & 0 deletions Documentation/RelNotes/2.50.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ Performance, Internal Implementation, Development Support etc.
* Reduce requirement for Perl in our documentation build and a few
scripts.

* The build procedure based on Meson learned to drive the
benchmarking tests.

* Code clean-up for meson-based build infrastructure.

* Add an equivalent to "make hdr-check" target to meson based builds.


Fixes since v2.49
-----------------
Expand Down Expand Up @@ -242,6 +249,9 @@ Fixes since v2.49
* Fix for scheduled maintenance tasks on platforms using launchctl.
(merge eb2d7beb0e jh/gc-launchctl-schedule-fix later to maint).

* Update to arm64 Windows port.
(merge 436a42215e js/windows-arm64 later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 227c4f33a0 ja/doc-block-delimiter-markup-fix later to maint).
(merge 2bfd3b3685 ab/decorate-code-cleanup later to maint).
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3334,8 +3334,10 @@ HCC = $(HCO:hco=hcc)
$(HCO): %.hco: %.hcc $(GENERATED_H) FORCE
$(QUIET_HDR)$(CC) $(ALL_CFLAGS) -o /dev/null -c -xc $<

.PHONY: hdr-check $(HCO)
# TODO: deprecate 'hdr-check' in lieu of 'check-headers' in Git 2.51+
.PHONY: hdr-check check-headers $(HCO)
hdr-check: $(HCO)
check-headers: hdr-check

.PHONY: style
style:
Expand Down
2 changes: 1 addition & 1 deletion ci/run-static-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ then
exit 1
fi

make hdr-check ||
make check-headers ||
exit 1

make check-pot
Expand Down
14 changes: 13 additions & 1 deletion compat/bswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ static inline uint64_t default_bswap64(uint64_t val)
#undef bswap32
#undef bswap64

#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
/**
* __has_builtin is available since Clang 10 and GCC 10.
* Below is a fallback for older compilers.
*/
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#if __has_builtin(__builtin_bswap32) && __has_builtin(__builtin_bswap64)
#define bswap32(x) __builtin_bswap32((x))
#define bswap64(x) __builtin_bswap64((x))

#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))

#define bswap32 git_bswap32
static inline uint32_t git_bswap32(uint32_t x)
Expand Down
18 changes: 14 additions & 4 deletions config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ ifeq ($(uname_S),Windows)
ifeq (MINGW32,$(MSYSTEM))
prefix = /mingw32
else
prefix = /mingw64
ifeq (CLANGARM64,$(MSYSTEM))
prefix = /clangarm64
else
prefix = /mingw64
endif
endif
# Prepend MSVC 64-bit tool-chain to PATH.
#
Expand Down Expand Up @@ -492,7 +496,7 @@ ifeq ($(uname_S),Windows)
NO_POSIX_GOODIES = UnfortunatelyYes
NATIVE_CRLF = YesPlease
DEFAULT_HELP_FORMAT = html
ifeq (/mingw64,$(subst 32,64,$(prefix)))
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
# Move system config into top-level /etc/
ETC_GITCONFIG = ../etc/gitconfig
ETC_GITATTRIBUTES = ../etc/gitattributes
Expand Down Expand Up @@ -731,6 +735,10 @@ ifeq ($(uname_S),MINGW)
prefix = /mingw64
HOST_CPU = x86_64
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
else ifeq (CLANGARM64,$(MSYSTEM))
prefix = /clangarm64
HOST_CPU = aarch64
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
else
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
BASIC_LDFLAGS += -Wl,--large-address-aware
Expand All @@ -745,8 +753,10 @@ ifeq ($(uname_S),MINGW)
HAVE_LIBCHARSET_H = YesPlease
USE_GETTEXT_SCHEME = fallthrough
USE_LIBPCRE = YesPlease
USE_NED_ALLOCATOR = YesPlease
ifeq (/mingw64,$(subst 32,64,$(prefix)))
ifneq (CLANGARM64,$(MSYSTEM))
USE_NED_ALLOCATOR = YesPlease
endif
ifeq (/mingw64,$(subst 32,64,$(subst clangarm,mingw,$(prefix))))
# Move system config into top-level /etc/
ETC_GITCONFIG = ../etc/gitconfig
ETC_GITATTRIBUTES = ../etc/gitattributes
Expand Down
31 changes: 8 additions & 23 deletions contrib/coccinelle/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ if not spatch.found()
subdir_done()
endif

third_party_sources = [
':!contrib',
':!compat/inet_ntop.c',
':!compat/inet_pton.c',
':!compat/nedmalloc',
':!compat/obstack.*',
':!compat/poll',
':!compat/regex',
':!sha1collisiondetection',
':!sha1dc',
':!t/unit-tests/clar',
':!t/unit-tests/clar',
':!t/t[0-9][0-9][0-9][0-9]*',
]

rules = [
'array.cocci',
'commit.cocci',
Expand Down Expand Up @@ -55,18 +40,18 @@ concatenated_rules = custom_target(
capture: true,
)

sources = [ ]
foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split()
sources += source
coccinelle_sources = []
foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_excludes, check: true).stdout().split()
coccinelle_sources += source
endforeach

headers = [ ]
foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split()
headers += meson.project_source_root() / header
coccinelle_headers = []
foreach header : headers_to_check
coccinelle_headers += meson.project_source_root() / header
endforeach

patches = [ ]
foreach source : sources
foreach source : coccinelle_sources
patches += custom_target(
command: [
spatch,
Expand All @@ -78,7 +63,7 @@ foreach source : sources
input: meson.project_source_root() / source,
output: source.underscorify() + '.patch',
capture: true,
depend_files: headers,
depend_files: coccinelle_headers,
)
endforeach

Expand Down
10 changes: 10 additions & 0 deletions environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ int max_allowed_tree_depth =
* the stack overflow can occur.
*/
512;
#elif defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
/*
* Similar to Visual C, it seems that on Windows/ARM64 the clang-based
* builds have a smaller stack space available. When running out of
* that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
* Git command was run from an MSYS2 Bash, this unfortunately results
* in an exit code 127. Let's prevent that by lowering the maximal
* tree depth; This value seems to be low enough.
*/
1280;
#else
2048;
#endif
Expand Down
Loading