After upgrading to LLVM/Clang 11 and rebuilding my projects, they failed with unresolved symbols like this:
C:/apps/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/10.2.0/../../../../i686-w64-mingw32/bin/ld.exe: plugins/llvm/CMakeFiles/lp0LLVM.dir/llvm.cpp.obj:llvm.cpp:(.text+0x9e73): undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::array<unsigned int, 5u>*)'
The corresponding symbol exported from libLLVM.dll.a is:
llvm::WriteBitcodeToFile(llvm::Module const&, llvm::raw_ostream&, bool, llvm::ModuleSummaryIndex const*, bool, std::__1::array<unsigned int, 5ull>*)
Note the __1:: postfix to std::. This hinted that the problem is that libLLVM.dll is linked to libc++.dll. Sure enough, after the build script was modified to use libc++, it succeeded.
This is the scenario where we are now (and please correct me if I'm wrong):
g++ can't use the LLVM libraries.
clang++ can link to the LLVM libraries if libc++ is used, but then using every other C++ library we distribute is problematic.
Was the transition to libc++ made taking into account those factors? And what do we gain with the move?
@mati865
After upgrading to LLVM/Clang 11 and rebuilding my projects, they failed with unresolved symbols like this:
The corresponding symbol exported from
libLLVM.dll.ais:Note the
__1::postfix tostd::. This hinted that the problem is thatlibLLVM.dllis linked tolibc++.dll. Sure enough, after the build script was modified to uselibc++, it succeeded.This is the scenario where we are now (and please correct me if I'm wrong):
g++can't use the LLVM libraries.clang++can link to the LLVM libraries iflibc++is used, but then using every other C++ library we distribute is problematic.Was the transition to
libc++made taking into account those factors? And what do we gain with the move?@mati865