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 using some dependencies which use this crate to link C/C++ libraries on windows (For example leptonica and tesseract).
I am trying to enable cross-language LTO on a build targeting x86_64-pc-windows-msvc. This requires compiling C/C++ code using an LLVM compiler, which means not using MSVC's cl.exe compiler. I have gotten it to compile using clang-cl instead of MSVC's cl.exe and lld-link.exe instead of link.exe manually building the C/C++ code and instructing my dependencies via env vars to not use this crate and instead use the libs I generated, but I think ideally vcpkg can be made to work with it.
I found this issue microsoft/vcpkg#2087 about clang-cl support in vcpkg, which was closed and vcpkg does not support a triplet for it, not as an official triplet, nor as a community maintained triplet shipped with vcpkg. However, vcpkg has support for "custom triplets" which are even less supported than community and you have to manually add to the vcpkg/triplets folder. And in that issue, someone shared their github repository with custom triplets which includes a x64-windows-llvm triplet that uses clang-cl. I'm opening this issue to check/discuss if somehow (Maybe through an environment variable) custom vcpkg triplet support would be in scope for this crate.
I am essentially thinking of something like:
REM I manually make a triplet file for vcpkg and add it to vcpkg/triplets before installing libs and then run thissetVCPKGRS_TRIPLET_OVERRIDE=x64-windows-llvm-thinlto
cargo build --release
The text was updated successfully, but these errors were encountered:
I'm using some dependencies which use this crate to link C/C++ libraries on windows (For example leptonica and tesseract).
I am trying to enable cross-language LTO on a build targeting x86_64-pc-windows-msvc. This requires compiling C/C++ code using an LLVM compiler, which means not using MSVC's cl.exe compiler. I have gotten it to compile using clang-cl instead of MSVC's cl.exe and lld-link.exe instead of link.exe manually building the C/C++ code and instructing my dependencies via env vars to not use this crate and instead use the libs I generated, but I think ideally vcpkg can be made to work with it.
I found this issue microsoft/vcpkg#2087 about clang-cl support in vcpkg, which was closed and vcpkg does not support a triplet for it, not as an official triplet, nor as a community maintained triplet shipped with vcpkg. However, vcpkg has support for "custom triplets" which are even less supported than community and you have to manually add to the vcpkg/triplets folder. And in that issue, someone shared their github repository with custom triplets which includes a
x64-windows-llvm
triplet that uses clang-cl. I'm opening this issue to check/discuss if somehow (Maybe through an environment variable) custom vcpkg triplet support would be in scope for this crate.I am essentially thinking of something like:
The text was updated successfully, but these errors were encountered: