Skip to content

Commit 7b9e1ba

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
clangarm64: let the tests pass! (#5586)
I encountered these issues that had hitherto escaped us [when I worked on letting the `ci-artifacts` workflow in git-sdk-arm64 also build Git and run the test suite](git-for-windows/git-sdk-arm64#37) by way of validating the `minimal-sdk` artifact. Mind, this PR does not only adjust a test case that was previously too fixated on x86_64. There are two real issues that this PR addresses and that were found via the test suite: - When the environment variable `MSYSTEM` is not yet set, it now is set appropriately even on Windows/ARM64 (and the `PATH` is adjusted accordingly). - The tree traversal limit designed to avoid stack overflows needed to be adjusted for the clangarm64 builds.
2 parents fa1a2c2 + a4e7c66 commit 7b9e1ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

environment.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,21 @@ int max_allowed_tree_depth =
9191
* tree depth; This value seems to be low enough.
9292
*/
9393
1280;
94+
#else
95+
#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
96+
/*
97+
* Similar to Visual C, it seems that on Windows/ARM64 the clang-based
98+
* builds have a smaller stack space available. When running out of
99+
* that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
100+
* Git command was run from an MSYS2 Bash, this unfortunately results
101+
* in an exit code 127. Let's prevent that by lowering the maximal
102+
* tree depth; This value seems to be low enough.
103+
*/
104+
1280;
94105
#else
95106
2048;
96107
#endif
108+
#endif
97109

98110
#ifndef PROTECT_HFS_DEFAULT
99111
#define PROTECT_HFS_DEFAULT 0

0 commit comments

Comments
 (0)