[llvm-dev] [RFC] Enable thread specific cl::opt values for multi-threaded support

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 23 02:00:29 PDT 2018


On 22.10.18 12:18, Jacob Lifshay wrote:
> On Mon, Oct 22, 2018, 02:53 Nicolai Hähnle via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 
>     Linux distributions prefer dynamic linking for their own good reasons,
>     and also ensure that the same LLVM binary will be used. So there's no
>     compatibility issue on that front, but the issue of isolating the
>     data /
>     options used by the two instances remains.
> 
> Would adding a thread-local mode to ManagedStatic help? There could also 
> be a ManagedStatic context, similar to an OpenGL context in that it can 
> be bound to a set of threads.

I don't think most ManagedStatics actually need it. Skimming over it, 
the only that sticks out is the CurrentDebugType, but since it's only 
for debugging it doesn't seem too critical.

Cheers,
Nicolai


> 
> Jacob Lifshay
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the llvm-dev mailing list