On Wed, Oct 15, 2025 at 11:19 AM LIU Hao <[email protected]> wrote:

> 在 2025-10-11 04:27, Tom Kacvinsky 写道:
> > A request is that there is an addition of __MINGW64_VERSION_GIT_HASH or
> some
> > such so that I know which revision of the mingw-w64-crt I am working
> with.
> >
> > Thoughts?
>
> I could think about declaring
>
>      extern const char __MINGW64_VERSION_GIT_HASH[];
>
> in _mingw.h, and define this value in C file, which is generated by a
> `.PHONY` recipe in Makefile.am,
> which invokes `git rev-parse --verify HEAD`.
>
> However this is actually not easy to maintain. It's necessary to check
> that one is really building from a
> Git repo and not an unpacked tarball inside another repo, for example,
> inside msys2/MINGW-packages. And
> it's also necessary to generate this file when doing a release, since this
> file can't be committed
> (otherwise it'd be a chicken-and-egg paradox).
>

Understood.  Thought it was worth a shot, though.

Regards,

Tom

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to