Argh. Thanks for the info. We're on Linux. On Fri, Dec 20, 2019 at 3:46 PM Praveen Velliengiri < praveenvelliengiri at gmail.com> wrote:> Hi Geoff, > Gathering from past, I remember that the ORCv2 doesn't support thread > local variable but not sure what is the current status now. What platform > you are on? > CC'ed (Lang hames) he knows exactly what is the status. > > On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now that >> I have worked around a problem getting global constructors to be called, >> everything seems to work unless a module declares a static thread-local >> variable. In that case I get a "JIT session error" saying that the symbol __ >> emutls_v.xyz was not found (substitute the mangled variable name for >> "xyz"). >> >> Does that mean anything to anybody out there? >> >> (I don't know if it's relevant, but we are using LLVM 8, and we are using >> Clang to compile C++ modules that are all put into a single JITDylib.) >> >> Geoff >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://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/20191220/18bf33ae/attachment.html>
Praveen Velliengiri via llvm-dev
2019-Dec-20 14:52 UTC
[llvm-dev] LLJIT vs. thread-local storage
Oh, I think Linux don't have support for TLS. On Fri, 20 Dec 2019 at 20:19, Geoff Levner <glevner at gmail.com> wrote:> Argh. Thanks for the info. We're on Linux. > > On Fri, Dec 20, 2019 at 3:46 PM Praveen Velliengiri < > praveenvelliengiri at gmail.com> wrote: > >> Hi Geoff, >> Gathering from past, I remember that the ORCv2 doesn't support thread >> local variable but not sure what is the current status now. What platform >> you are on? >> CC'ed (Lang hames) he knows exactly what is the status. >> >> On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now >>> that I have worked around a problem getting global constructors to be >>> called, everything seems to work unless a module declares a static >>> thread-local variable. In that case I get a "JIT session error" saying that >>> the symbol __emutls_v.xyz was not found (substitute the mangled >>> variable name for "xyz"). >>> >>> Does that mean anything to anybody out there? >>> >>> (I don't know if it's relevant, but we are using LLVM 8, and we are >>> using Clang to compile C++ modules that are all put into a single JITDylib.) >>> >>> Geoff >>> _______________________________________________ >>> LLVM Developers mailing list >>> llvm-dev at lists.llvm.org >>> https://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/20191220/cd2b704e/attachment.html>
And yet the same C++ code using thread-local variables works fine (or seems to) when compiled with Orc v1. Does the change to the Orc API really make thread-local storage more difficult? On Fri, Dec 20, 2019 at 3:52 PM Praveen Velliengiri < praveenvelliengiri at gmail.com> wrote:> Oh, I think Linux don't have support for TLS. > > On Fri, 20 Dec 2019 at 20:19, Geoff Levner <glevner at gmail.com> wrote: > >> Argh. Thanks for the info. We're on Linux. >> >> On Fri, Dec 20, 2019 at 3:46 PM Praveen Velliengiri < >> praveenvelliengiri at gmail.com> wrote: >> >>> Hi Geoff, >>> Gathering from past, I remember that the ORCv2 doesn't support thread >>> local variable but not sure what is the current status now. What platform >>> you are on? >>> CC'ed (Lang hames) he knows exactly what is the status. >>> >>> On Fri, 20 Dec 2019 at 18:39, Geoff Levner via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> I am in the process of porting our ORC code to ORC v2 and LLJIT. Now >>>> that I have worked around a problem getting global constructors to be >>>> called, everything seems to work unless a module declares a static >>>> thread-local variable. In that case I get a "JIT session error" saying that >>>> the symbol __emutls_v.xyz was not found (substitute the mangled >>>> variable name for "xyz"). >>>> >>>> Does that mean anything to anybody out there? >>>> >>>> (I don't know if it's relevant, but we are using LLVM 8, and we are >>>> using Clang to compile C++ modules that are all put into a single JITDylib.) >>>> >>>> Geoff >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> llvm-dev at lists.llvm.org >>>> https://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/20191220/d923cc0c/attachment.html>