-
Notifications
You must be signed in to change notification settings - Fork 982
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
[question] AutotoolsToolchain uses MSVC flags with clang #17342
Comments
Hi @jijjijj Thanks for your question.
Could you please clarify which clang are you using in Windows, the msvc-backed clang (irrespective of clang or clang-cl front), or the msys2-backed clang? In case you haven't read this, this blog post is relevant: https://blog.conan.io/2022/10/13/Different-flavors-Clang-compiler-Windows.html I think the |
@memsharded I use CLang 19.1.3 provided by LLVM. I downloaded it right from their GitHub page. According to the article it should fall under the "MSVC-backed" clangs |
I am having a look.
And with
The |
So, is this a bug in AutotoolsToolchain? |
Yes, yes, it looks there is a gap, maybe not only in AutotoolsToolchain, but lack of model for clang/clang-cl differences, as the current model is more focused on the binary compatibility than on the compiler frontend input args. |
What is your question?
So I have a Win64 build with
clang
set as a compiler and I try to buildmpg123
which uses Autotools to configure itself. The build fails because Autotools receive-MDd
flag insideCFLAGS
which is not supported byclang/clang++
only byclang-cl
(which I don't want to use).So I went to code of AutotoolsToolchain and I found this
Where
_get_msvc_runtime_flag()
returns the runtime flag appropriate forMS cl.exe
orclang-cl
but not for clang. And then incflags()
it just returns it without any regard to the actual compiler in use.At the same time, when choosing flags relevant for mac/apple compilers it does filter the flags out in case the current system isn't appropriate.
What's up with that?
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: