mati865 added a comment.

> Older versions of lld didn't error out if exceeding the limit, this is fixed 
> in D86701 <https://reviews.llvm.org/D86701>, unfortunately after the 11 
> branch.

Thanks, I'll backport it for MSYS2 LLVM 11 package.

> With -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang 
> -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_RANLIB_COMPILER=llvm-ranlib 
> -DCMAKE_AR_COMPILER=llvm-ar -DCMAKE_LINKER=ld.lld -DLLVM_ENABLE_LLD=ON 
> libclang-cpp.dll has 65535 exports, seems it got truncated?

After adding `-DLLVM_BUILD_LLVM_DYLIB=ON` libclang-cpp.dll has 37660 exports, 
libLLVM.dll gets truncated.
Considering my previous findings linking libclang-cpp.dll to libLLVM.dll seems 
to reduce amount of exports to safer 30k-40k range.

Possible solutions:

- revert this diff so I carry downstream MSYS2 patch (easy)
- gate building of libclang-cpp.dll for MinGW on `LLVM_BUILD_LLVM_DYLIB=ON` 
(easy)
- export less symbols from libclang-cpp.dll (probably hard or very hard)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87547/new/

https://reviews.llvm.org/D87547

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to