Skip to content
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

Some clangarm64 fixes #5439

Merged
merged 8 commits into from
Feb 26, 2025
Merged

Some clangarm64 fixes #5439

merged 8 commits into from
Feb 26, 2025

Conversation

dscho
Copy link
Member

@dscho dscho commented Feb 25, 2025

Most notably, this fixes #5431, i.e. that the ARM64 flavor of Git for Windows does not use /etc/gitconfig by mistake, but /clangarm64/etc/gitconfig instead.

My original intention was to fix only that issue, but when I fired up a Git for Windows/ARM64 SDK and tried to build, I immediately ran into trouble, then noticed places where ARM64 was not yet handled, and one thing led to another and now it's a 6-patch PR instead of a single-patch one.

Clang has newly developed an antipathy for unions and arrays of structs
that contain flex arrays... Let's just pat clang's head and move on.

Signed-off-by: Johannes Schindelin <[email protected]>
This is needed because clang now complains about arrays of structs that
contain flex array members.

Signed-off-by: Johannes Schindelin <[email protected]>
Git for Windows/ARM64 settled on using `clang` to compile `git.exe`, and
hence needs to run in a system where `MSYSTEM` is set to `CLANGARM64`
and the prefix to use is `/clangarm64`.

We already did that in the `MINGW` arm, i.e. for regular Git for Windows
builds using MINGW GCC (or `clang`'s shim pretending to be GCC), now it
is time to do the same in the MS Visual C part.

Signed-off-by: Johannes Schindelin <[email protected]>
In fb5e337 (mingw: move Git for Windows' system config where users
expect it, 2021-06-22), I moved the location of Git for Windows' system
config and system Git attributes file to the top-level `/etc/` directory
(because it is a much more obvious location than, say, `/mingw64/etc/`).

The patch relied on a very specific scenario that the newly-supported
Windows/ARM64 builds of `git.exe` fails to fall into. So let's broaden
the condition a bit, so that Windows/ARM64 builds also use that location
(instead of the even more obscure `/clangarm64/etc/` directory).

This fixes #5431.

Signed-off-by: Johannes Schindelin <[email protected]>
This commit introduced an `else ifeq` pattern that is arguably more
elegant than the previous pattern, so let's adjust the existing
conditional block, too.

Signed-off-by: Johannes Schindelin <[email protected]>
This makes the code a bit less fragile by being less dependent on
multiple adjustments for any new `MSYSTEM` value.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho added this to the Next release milestone Feb 25, 2025
@dscho dscho self-assigned this Feb 25, 2025
This needs to be guarded against GCC complaining that it does not know
this option... _sigh_

Signed-off-by: Johannes Schindelin <[email protected]>
This needs to be guarded against GCC complaining that it does not know
this option... _sigh_

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho merged commit ba6e4aa into main Feb 26, 2025
96 checks passed
@dscho dscho deleted the clangarm64-fixes branch February 26, 2025 18:35
git-for-windows-ci pushed a commit that referenced this pull request Feb 26, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
git-for-windows-ci pushed a commit that referenced this pull request Feb 26, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
git-for-windows-ci pushed a commit that referenced this pull request Feb 26, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
git-for-windows-ci pushed a commit that referenced this pull request Feb 26, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
dscho added a commit that referenced this pull request Feb 26, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
git-for-windows-ci pushed a commit that referenced this pull request Mar 4, 2025
Most notably, this fixes
#5431, i.e. that the ARM64
flavor of Git for Windows does not use `/etc/gitconfig` by mistake, but
`/clangarm64/etc/gitconfig` instead.

My original intention was to fix only that issue, but when I fired up a
Git for Windows/ARM64 SDK and tried to build, I immediately ran into
trouble, then noticed places where ARM64 was not yet handled, and one
thing led to another and now it's a 6-patch PR instead of a single-patch
one.
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.

Git for Windows/ARM64 improperly uses /clangarm64/etc/gitconfig instead of /etc/gitconfig
3 participants