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
unsupported option '-mwindows' for target 'x86_64-pc-windows-msvc' #69964
Comments
In MSVC mode, the In conda-forge/libhwloc-feedstock#69 (comment) I see this comment:
That's exactly the case. |
Gotcha. Thanks for your help! 🙏 Will follow up with |
Raised |
(hwloc upstream developer) |
With Clang in MinGW mode, you can still use With MSVC, and Clang acting in MSVC mode, you don't normally pass any such flag. It is possible to pass it to the linker (in MSVC mode, most build systems invoke link.exe or lld-link directly without using the compiler driver inbetween) by setting a suitable subsystem parameter, but in most cases, you don't need to, afaik. If no subsystem is specified, it is inferred from the symbols of the linked object files: https://github.com/llvm/llvm-project/blob/llvmorg-17.0.3/lld/COFF/Driver.cpp#L761-L784 |
Hmm, thanks, that's a bit too complicated for my basic knowledge of all these ways to build on windows. I was going to remove -mwindows if building for "x86_64-pc-windows-msvc", but our configure actually see "x86_64-pc-mingw64" instead. It also sees that the compiler is Clang with _MSC_VER defined. Is that a good way to detect this case? |
I'm not sure what your build environment is - but it seems to be made up from a number of not entirely matched components. You might have some mingw tools somewhere, but the Clang executable you have defaults to MSVC mode. Primarily, Clang in MSVC mode would be used via the clang-cl interface, which is compatible with the argument style of MSVC's
Yes, if |
@llvm/issue-subscribers-clang-driver Author: None (jakirkham)
Am seeing the following error when building with Clang 17.0.2 on Windows using MSVC 14.3. AFAICT this is a similar issue as occurred with MinGW ( https://github.com//issues/64464 ), but this is with MSVC. More background in the OP of PR ( https://github.com//pull/67891 ) (though that doesn't fix the MSVC target issue)
|
Am seeing the following error when building with Clang 17.0.2 on Windows using MSVC 14.3. AFAICT this is a similar issue as occurred with MinGW ( #64464 ), but this is with MSVC. More background in the OP of PR ( #67891 ) (though that doesn't fix the MSVC target issue)
The text was updated successfully, but these errors were encountered: