Open ZzEeKkAa opened 5 months ago
There was a patch https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1543 that later was reverted, see the latest comments in the PR. If you try it on windows - would it help?
@MrSidims as far as I can understand - it does the oposit - blocks shared library build and build static library, when trying to build shared one with LLVM_LINK_LLVM_DYLIB
. Moreover LLVM_LINK_LLVM_DYLIB is not supported on Windows:
LLVM_BUILD_LLVM_DYLIB:BOOL If enabled, the target for building the libLLVM shared library is added. This library contains all of LLVM’s components in a single shared library. Defaults to OFF. This cannot be used in conjunction with BUILD_SHARED_LIBS. Tools will only be linked to the libLLVM shared library if LLVM_LINK_LLVM_DYLIB is also ON. The components in the library can be customised by setting LLVM_DYLIB_COMPONENTS to a list of the desired components. This option is not available on Windows.
Hello there!
I've tried to build library on windows, but it seems like there is no option to build it as shared library on windows:
LLVM does not support shared libraries on windows: https://www.llvm.org/docs/CMake.html#llvm-related-variables And the way library is written is
add_llvm_library
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/main/lib/SPIRV/CMakeLists.txt#L43If I try to build it with
-DLLVM_BUILD_LLVM_DYLIB=ON
, I get :So
cmake
builds library as.dll
, but whenever it comes to buildingllvm-spirv
binary it is looking for static library.Please note, that on linux it works as expected: It creates shared library and links binary to it.
So do you have any ideas how to bypass it?