[m-rev.] diff: Support llvm-mingw targets in configure_cross.

Peter Wang novalazy at gmail.com
Fri Aug 8 16:45:25 AEST 2025


On Fri, 08 Aug 2025 16:09:06 +1000 Julien Fischer <jfischer at opturion.com> wrote:
> On Fri, 8 Aug 2025 at 16:07, Peter Wang <novalazy at gmail.com> wrote:
> >
> > tools/configure_cross:
> >     Include config values for llvm-mingw (clang) compilers
> >     targeting Windows/x86-64 and Windows/ARM64.
> 
> Does the x86_64 one work?  I've never had much luck getting
> a working Mercury compiler with it on Windows.

Hmm, I've now cross-compiled Mercury with x86_64-w64-mingw32-clang,
then transferred the result to a Windows 10 VM, running it inside a
MSYS2 environment.

If I try "mmc e.m", I get this error:

    Error: /var/tmp/mercury-llvm-mingw/lib/mercury:
      file not accessible: No such file or directory.

even though the path definitely exists.

If I set MERCURY_STDLIB_DIR=/var/tmp/mercury-llvm-mingw/lib/mercury
first, then I'm able to compile e.m, as well as run "mmc --make diff".
The resulting programs work as well.

So, something is not quite right, but it's not far off.

Peter


More information about the reviews mailing list