[llvm-dev] Cannot build Clang/LLVM on Windows with LLVM_BUILD_LLVM_DYLIB
NAKAMURA Takumi via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 9 02:59:03 PDT 2017
It's unsupported on MS toolchain. It's too hard to make LLVM headers and
libs DLL-ready.
It would be theoretically possible on mingw. (oops, it requires awk...)
On Fri, Jun 9, 2017 at 5:25 PM biologi spm via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I am trying to build Clang/LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON and
> -DLLVM_LINK_LLVM_DYLIB=ON to reduce the size of toolchain.
>
> I am getting LINK error 1181 about `lib\LLVM.lib` not found. After
> investigating, `lib\LLVM.lib` is supposed to be produced along with
> `bin\LLVM.dll`. `bin\LLVM.dll` is indeed produced, but it does not
> contain any exported symbols (10KB only) because LLVM does not use
> `__declspec(dllexport)` and `__declspec(dllimport)`, so lib.exe
> refuses to produce `lib\LLVM.lib`.
>
> If I just build static-linked Clang/LLVM (default), it works fine.
>
> Windows bot of WebAssembly waterfall is also affected:
>
> https://github.com/WebAssembly/waterfall/commit/2051fd4cdb2b4017e66dfcd70203d40f3d0b461d
>
> Compiler: Visual Studio 2017
>
> CMake configuration:
>
> cmake -GNinja -Bbuild -Hllvm -DCMAKE_BUILD_TYPE=Release
> -DLLVM_INCLUDE_EXAMPLES=OFF
> -DLLVM_INCLUDE_TESTS=OFF
> -DCMAKE_INSTALL_PREFIX=d:\a\1\b
> -DLLVM_TARGETS_TO_BUILD=X86
> -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON
> -DLLVM_BUILD_LLVM_DYLIB=ON
> -DLLVM_LINK_LLVM_DYLIB=ON
> -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170609/6678c058/attachment.html>
More information about the llvm-dev
mailing list