Open tomager opened 2 months ago
-mwin32
is a Cygwin option, not MinGW/mingw-w64 related one: https://github.com/libusb/libusb/blob/467b6a8896daea3d104958bf0887312c5d14d150/configure.ac#L130
I guess this was recently changed. In 1.0.26 which we use and is quite recent it’s for both cygwin and mingw:
https://github.com/libusb/libusb/blob/v1.0.26/configure.ac
The current gcc docs (link I posted earlier) say it’s for both:
This option is available for Cygwin and MinGW targets. It specifies that the typical Microsoft Windows predefined macros are to be set in the pre-processor, but does not influence the choice of runtime library/startup code.
The gcc-supported option -mwin32 doesn't appear to be supported in llvm-mingw/clang.
A handful of the other options listed at [2] are also unsupported, but -mwin32 seems to be the only "core" option that isn't supported on the llvm side.
The supported options are -mwindows -municode -mthreads -mdll -mconsole
The unsupported options are -mpe-aligned-commons -fwritable-relocated-rdata -fno-set-stack-executable -mnop-fun-dllimport -mwin32
[1] from libusb llvm-mingw build:
[2] https://gcc.gnu.org/onlinedocs/gcc/Cygwin-and-MinGW-Options.html
[3]