You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that using clang directly as a compiler on windows is very hit and miss with regard to what packages will actually build successfully, and I've had much more success using Visual Studio with the toolset set to ClangCL as seen in the above profile. However when building boost with this profile, the recipe selects "msvc" as the toolset to use for building which results in cl.exe being invoked instead of clang-cl.exe.
conan install boost/1.75.0@ -r conan-center -pr vs-clang can be used with a common conan installation to reproduce the behavior, where profile vs-clang equals the aforementioned profile.
It's unlikely that building under the "msvc" toolset will ever be the intent of a user using the above profile and so I'd suggest the behavior be changed to select the "win-clang" toolset when conan specifies the compiler toolset as ClangCL in conjunction with the Visual Studio compiler.
The current behavior is caused by the branch on line 1054 of conanfile.py (seen below) being eagerly taken when Visual Studio is the compiler specified by conan.
ifself._is_msvc: # <-- branch always followed when compiler given by conan is "Visual Studio"return"msvc"elifself.settings.os=="Windows"andself.settings.compiler=="clang": # <-- ideally this branch should be followed when compiler.toolset is "ClangCL"return"clang-win"
I've had success with building using the "clang-win" toolset on the above profile by changing the first branch to read the following, but it feels like a very dirty solution considering that the next branch still exists and serves a similar purpose.
Package and Environment Details
Conan profile
Steps to reproduce
I've found that using clang directly as a compiler on windows is very hit and miss with regard to what packages will actually build successfully, and I've had much more success using Visual Studio with the toolset set to ClangCL as seen in the above profile. However when building boost with this profile, the recipe selects "msvc" as the toolset to use for building which results in
cl.exe
being invoked instead ofclang-cl.exe
.conan install boost/1.75.0@ -r conan-center -pr vs-clang
can be used with a common conan installation to reproduce the behavior, where profilevs-clang
equals the aforementioned profile.It's unlikely that building under the "msvc" toolset will ever be the intent of a user using the above profile and so I'd suggest the behavior be changed to select the "win-clang" toolset when conan specifies the compiler toolset as ClangCL in conjunction with the Visual Studio compiler.
The current behavior is caused by the branch on line 1054 of conanfile.py (seen below) being eagerly taken when Visual Studio is the compiler specified by conan.
I've had success with building using the "clang-win" toolset on the above profile by changing the first branch to read the following, but it feels like a very dirty solution considering that the next branch still exists and serves a similar purpose.
The text was updated successfully, but these errors were encountered: