-
Notifications
You must be signed in to change notification settings - Fork 945
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
[bug] cross compiling with clang-cl #7868
Comments
Clang has a different cross compilation model compared to gcc. Generally speaking, most clang binaries that linux distributions provide, or are provided at llvm.org, can produce binaries for all of the architectures and operating systems clang supports. Because of this, you can't simply point to a binary and expect clang to magically intuit the target/host you want for your binaries, you have to do some configuration. The conan documentation you reference provides a very gcc oriented notion to cross compiling, and I have no idea if conan has support for clang style cross compilation (I doubt it). This probably fits more as a feature to look at with conan 2.0, when build profile (i.e. the system you are compiling on) will be separated from host profile (i.e. the system your binaries will run on). |
Thanks for the answer. |
This PR #11492, merged for next 1.53 contains a few changes to better support clang in Windows, mainly for the new There are some other pending issues about the Windows subsystems environment management, we are also trying to improve them in #12178, so if you are using Clang in some subsystem and depend on the environment, you might want to track this PR too. Closing this issue now, but we know that there might still be some gaps, so please try to update to the new integration (this is necessary for 2.0 anyway), and report what might still be failing against this new integration. The best starting point would be the tests in https://github.com/conan-io/conan/blob/develop/conans/test/functional/toolchains/cmake/test_cmake_toolchain_win_clang.py, or using any of the predefined templates |
Hello, this might be a feature request and not a bug or just me doing it wrong, so sorry if it is.
Anyway, I am trying to build binaries on Linux for Windows using clang-cl.
I saw that it was possible to cross compile here with mingw: https://docs.conan.io/en/latest/systems_cross_building/cross_building.html
I am on ubuntu and I installed clang-cl with
sudo apt-get install clang-tools
. Also using conan 1.30.1.Here's my profile (linux_to_win64) so far.
And the command to install it.
which gives me the following error
The text was updated successfully, but these errors were encountered: