Skip to content

Fix t0060.221 on Windows/ARM64 #5610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Apr 30, 2025

Apparently my tests of #5586 had been incomplete. This here patch is needed to let t0060.221 pass (where it verifies that git.exe sets MSYSTEM correctly if that environment variable has not yet been set): Simply reverse the order of the tests whether to set MINGW64 or CLANGARM64 to avoid using the former on Windows/ARM64 by mistake.

This patch makes it so that Git really sets the desired `MSYSTEM` on
Windows/ARM64.

The reason this did not work (and my faulty tests did not catch that
before merging git-for-windows#5586) is that
clang (at least version 20.1.3 as built from
https://github.com/git-for-windows/MINGW-packages
8df0c2fff4184deff15acce9bfd791fb6e0d60fe) predefines the `__MINGW64__`
constant:

	$ echo | clang -dM -E - | grep -n MINGW64
	249:#define __MINGW64__ 1

Let's just switch the order between the CLANGARM64 and the MINGW64 test;
This will still work for MINGW64 because none of the constants used in
the CLANGARM64 condition are defined for x64 gcc (or for that matter,
clang).

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho requested a review from mjcheetham April 30, 2025 14:28
@dscho dscho self-assigned this Apr 30, 2025
@dscho dscho merged commit 92f4ffb into git-for-windows:main Apr 30, 2025
29 checks passed
@dscho dscho deleted the really-support-clangarm64 branch April 30, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants