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'm trying to compile a windows project using the msvc toolchain and cross language LTO. To do this, I'm trying to use clang-cl instead of the MSVC cl.exe to compile the C/C++ code. I'm running into a problem where cc-rs tries to use lib.exe to archive the generated object files, but MSVC's lib.exe does not understand the clang object files with LLVM bitcode for LTO, so it crashes. I'm opening this issue for discussion, ideally I would like a solution like an env var that lets me override the archiver, or identifying clang-cl with LTO and trying to find LLVM-lib (I don't know if rust ships with one, but if not maybe there could be an env var with a path to an installer LLVM/bin).
I also tried to temporarily make a copy of LLVM-lib called lib.exe and put it before lib.exe in my path but it didn't work because cc-rs is finding the specific VS path to lib.exe from the registry.
The text was updated successfully, but these errors were encountered:
I'm trying to compile a windows project using the msvc toolchain and cross language LTO. To do this, I'm trying to use clang-cl instead of the MSVC cl.exe to compile the C/C++ code. I'm running into a problem where cc-rs tries to use lib.exe to archive the generated object files, but MSVC's lib.exe does not understand the clang object files with LLVM bitcode for LTO, so it crashes. I'm opening this issue for discussion, ideally I would like a solution like an env var that lets me override the archiver, or identifying clang-cl with LTO and trying to find LLVM-lib (I don't know if rust ships with one, but if not maybe there could be an env var with a path to an installer LLVM/bin).
I also tried to temporarily make a copy of LLVM-lib called lib.exe and put it before lib.exe in my path but it didn't work because cc-rs is finding the specific VS path to lib.exe from the registry.
The text was updated successfully, but these errors were encountered: