aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-05-05 14:56:24 -0700
committerJunio C Hamano <gitster@pobox.com>2025-05-05 14:56:24 -0700
commitb50795db7969712ef937906d548fe9eb58cb9fb5 (patch)
treeaf44dbda9c227254aea1e7cd656a95362adbd6c6 /environment.c
parent6c0bd1fc70efaf053abe4e57c976afdc72d15377 (diff)
parent436a42215e51fa2f8b74d128472d7d9bfe2595e1 (diff)
downloadgit-b50795db7969712ef937906d548fe9eb58cb9fb5.tar.xz
Merge branch 'js/windows-arm64'
Update to arm64 Windows port. * js/windows-arm64: max_tree_depth: lower it for clangarm64 on Windows mingw(arm64): do move the `/etc/git*` location msvc: do handle builds on Windows/ARM64 mingw: do not use nedmalloc on Windows/ARM64 config.mak.uname: add support for clangarm64 bswap.h: add support for built-in bswap functions
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/environment.c b/environment.c
index 970a407753..c61d773e7e 100644
--- a/environment.c
+++ b/environment.c
@@ -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