What does -vtls compiler flag does and ...
Stanislav Blinov
stanislav.blinov at gmail.com
Wed Oct 3 21:23:25 UTC 2018
On Wednesday, 3 October 2018 at 21:18:26 UTC, welkam wrote:
> On Wednesday, 3 October 2018 at 20:58:01 UTC, Stanislav Blinov
> wrote:
>> No, all *static non-immutable* variables are thread-local by
>> default, not just "all variables".
> I misspoke but this should write something
> https://run.dlang.io/is/3u1wFp
And it does print "testtest" when you run it. But there are no
thread-local variables there, so the compiler doesn't print
anything extra when compiling. That's what -vtls flag does:
during compilation reports which variables are thread-local.
> If you look at asm output there are "call _d_arraycatT at PLT32"
> instruction so those variables weren't optimized away and yet
> no output to stdout.
>
> If remove that flag ldc now compiles dmd but lacks
> optimizations so more work needs to be done.
I'm not sure I understand.
More information about the Digitalmars-d-learn
mailing list