Hi, On Thu, Jun 30, 2022 at 12:42 AM Kevin Sheppard <kevin.k.sheppard@gmail.com> wrote:
Hi,
I am very sorry - I feel I should know this, or be able to work it out, but is there a way of setting the flags to the C compiler and the linker, for the Numpy build, on Windows?
I'm trying to set the flags for a build with Windows mingw-w64 - but I believe Numpy is ignoring $env:LDFLAGS, $env:CFLAGS and $env:OPT - and I can't see any way of setting these options from the command line. Am I missing something?
Cheers,
Matthew
Member address: kevin.k.sheppard@gmail.com
I think these are all hard coded and non-changable. This was the case when I got NumPy building with clang-cl.
That was my impression too, but I was delayed by the text at: https://numpy.org/doc/stable/user/building.html#supplying-additional-compile... which says: """ Additional compiler flags can be supplied by setting the OPT, FOPT (for Fortran), and CC environment variables. When providing options that should improve the performance of the code ensure that you also set -DNDEBUG so that debugging code is not executed. """ I guess we should change that text to note these do not work on Windows. I think you can supply extra Fortran flags with the `config_gc` option to `setup.py`, but I don't think the others have any effect on Windows. I was also confused by these lines in `azure-steps-windows.yml`: """ $env:CFLAGS = "-m32" $env:LDFLAGS = "-m32" """ I assume these don't actually have any effect. Cheers, Matthew