On 5 May 2015 at 09:48, Mike via Digitalmars-d <digitalmars-d@puremagic.com> wrote: > On Tuesday, 5 May 2015 at 06:56:52 UTC, Iain Buclaw wrote: >> >> >> Configure GDC with --disable-tls --disable-threads to get the desired >> behaviour (disabling only TLS just makes codegen fallback to emulated thread >> support). > > > I didn't know this. You mean if I configure with those options, > TLS variables will be treated as __gshared? > > Mike
I have no control over what the backend does, but if it generates control variables for them (emulated tls), then __get_address would incur a small heap cost when first retrieved. If the cost is too much (ie: there is no heap), then we should be able to stop emutls from kicking in by preventing the D frontend from returning true on isThreadLocal calls.