Skip to content

Commit febcd7a

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 5ae95ed + f36ec74 commit febcd7a

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
@@ -98,9 +98,21 @@ int max_allowed_tree_depth =
9898
* tree depth; This value seems to be low enough.
9999
*/
100100
1280;
101+
#else
102+
#if defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
103+
/*
104+
* Similar to Visual C, it seems that on Windows/ARM64 the clang-based
105+
* builds have a smaller stack space available. When running out of
106+
* that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
107+
* Git command was run from an MSYS2 Bash, this unfortunately results
108+
* in an exit code 127. Let's prevent that by lowering the maximal
109+
* tree depth; This value seems to be low enough.
110+
*/
111+
1280;
101112
#else
102113
2048;
103114
#endif
115+
#endif
104116

105117
#ifndef PROTECT_HFS_DEFAULT
106118
#define PROTECT_HFS_DEFAULT 0

0 commit comments

Comments
 (0)