-
Notifications
You must be signed in to change notification settings - Fork 72
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
Support clang-cl on windows #7
Conversation
Credits to @zufuliu for the original patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contrib.
A change like this should probably be accompanied by additional tests and documentation. I know the documentation isn't part of this repo, but could you at least in the PR provide a description about the motivation for making this change, where it can be used, why one would use it, and how one would use it? Also, would you link to any existing pertinent issues that request this functionality?
As for tests, functional tests in the test suite would be best, but short of that, I'd at least like to see a demonstration of the behavior in action. Can you show an example that minimally exercises the behavior?
clang-cl.exe can be found by registry, official LLVM installer will set default value for HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM or HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\LLVM\LLVM as the installation path (at most only one installation is allowed, the installer will remove previous installation before installing). I think find clang-cl.exe in PATH is useful for self unpacked/built LLVMs, when clang-cl.exe not found in PATH (i.e. LLVM/bin not added to PATH by user or the installer), try to find clang-cl.exe from registry would be better. |
Happy to revive this PR if the above questions/concerns can be addressed. |
@jaraco, I updated the PR description. Let me know if it answers your questions |
These are the questions I'm looking to answer. |
Credits to @zufuliu for the original patch.
To use clang-cl compiler, you can use
clang-cl is a compiler by the clang/LLVM team that is API compatible with the MSVC compiler cl and the object files created are ABI compatible with MSVC compiled objects. clang-cl by default uses the MSVC environment that is activated in the environment and finds the libraries from that MSVC environment. Reasons to use clang-cl is that it has more features than MSVC's cl, it is open source and it can be used from other platforms to cross-compile to windows.