LLVM-C.dll in LLVM release 10 seem to be incomplete/missing export directory

Hello,

I downloaded the LLVM 10 release for windows and noticed, that the LLVM-C.dll for x86 has a size of 9kb, which seems strangely small.

Both, the dll for x86 and x64, have no export directory. It is not possible to link them statically to Delphi code or call GetProcAddress on them.

I do remember that this worked initially when https://reviews.llvm.org/D56774 was done when compiling the dll using cmake+vs on windows.

Just checked again. Only the x86 dll is broken. The x64 is fine.

I suspect we took the wrong branch here https://github.com/llvm/llvm-project/blob/ab411801b82783eb7f652701ccfce81b16cf1811/llvm/tools/llvm-shlib/CMakeLists.txt#L119-L124 because LLVM_HOST_TRIPLE might have been “i686-pc-windows-msvc” instead.

Hi David,

Interesting.

I tested rebuilding from source on windows, using the source archive on the downlodpage. While the x64 target using cmake created a proper solution for VS, the x86 target created a solution where some libs were not added as dependency on the LLVM-C library and the LLVM-C.exports, too. In my particular case LLVMGlobalISel and LLVMXCodeGen were not wired up correctly. Once i had these builded separately, the final linking seemed to not take any of the builded libs into account. On my system the x86 DLL was 9 kbytes, too. So in addition to the used host-triple, something else might be broken. I haven’t done anything with CMake yet, to give an answer on how to fix it.