[PATCH] D73508: [LLD][COFF] Fix dll import for thread_local storage
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 13:34:11 PST 2020
mstorsjo added a comment.
In D73508#1844884 <https://reviews.llvm.org/D73508#1844884>, @zero9178 wrote:
> Thank you for your very detailed explanation. Do you think it'd be worth updating documentation and cmake then to error if threading is enabled and build shared libs chosen?
Hmm, maybe, not sure - not sure what the situation is with e.g. MSVC and BUILD_SHARED_LIBS either; I guess it isn't supported (as there's no mechanism for adding dllimport attibutes in all the internal interfaces where it would be necessary), but not sure if it errors out loudly or if it's just practically unsupported.
It has so far been kind of almost possible with mingw, thanks to the automatic import of data members from DLLs, but this issue (with the recent introduction of tls variables shared between object files) certainly makes it harder. And in addition to this, iirc there were some weird issues where both an import library and a static library of the same was linked, causing various weird issues. I haven't had time to look into that whole build setup lately - I just have some brief notes from trying, that there were issues.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73508/new/
https://reviews.llvm.org/D73508
More information about the llvm-commits
mailing list