I was playing around with dmd`s make file trying to see if I can
compile dmd with different compilers and different compilation
flags. By playing around I found that some dmd files are compiled
with -vtls flag unconditionally and that ldc do not support this
flag. First I dont know what -vtls flag does so I looked at
documentation.
DMD documentation says:
-vtls
List all variables going into thread local storage
GDC documentation says:
-fd-vtls
Print information about all variables going into thread local
storage to stdout.
This doesnt help much. I still have no idea what it actually
does. Aren't all variables thread local unless explicitly
specified? So I tried to compile simple example and dmd printed
nothing. GDC printed this:
gdc: error: unrecognized command line option ‘-fd-vtls’
One gdc wiki(https://wiki.dlang.org/Using_GDC) is out of date and
second I still have no clue what is does.
This flag blocks compilation and I want to just remove it but
since I dont know what it is used for I hesitate. If my attempts
were to be successful in compiling dmd with other compilers I
would make pull request but now I have more question than
answers. What this flag does? Why some files compiled with it and
other dont? Why it is added to all compilation targets
unconditionally?