-
-
Notifications
You must be signed in to change notification settings - Fork 667
Fix Issue 18325 - Don't display TLS variables when building DMD #8018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8018" |
|
As far as I know we don’t use TLS variables in DMD. Doesn’t this flag help showing when a TLS variable is accidentally added? |
TLS variables are used in druntime, hence the warning and as the warning has been there for quite a while, it doesn't seem to break anything...
Yes, but I don't see any reason why TLS variables shouldn't be used... |
|
It was used primarily to make sure that nothing was silently changed in the C++ - > D conversion. It is subsequently there as a reminder to not accidentally break the extern interface if you intend on exposing a new static var to other languages. There is a possible future™ design where parsing/semantic of all modules are done asynchronously. But I think the only person interested in that is Walter. |
Except who is watching this? If it's not tested in CI, then it's useless. I vote to remove it. |
|
Alternatively, you can leave it in for certain builds, but it needs to be flagged as an error, not just "information" that only helps if you read the build logs fully. And the messages from druntime need to be ignored in this case. |
I watch it since I see the resulting messages every time I build the compiler. |
|
@marler8997 what I mean is that nobody is reading meticulously the build logs from the auto tester, so if it's not being caught there, then if someone adds something that triggers a message, nobody notices. Sure, you will notice after it's merged and potentially released. But that's useless IMO. |
Let me rephrase. Thread local variables should be kept in check as they cannot be reliably accessed outside of D code. Think platforms where dmd rolls their own tls storage. Removing this outright is not the way to go, you could add it to DFLAGS perhaps though? Maybe make it part of the DEBUG builds and hope that you never introduce silent corruption for gdc and ldc which will annoy us royally for the hours of debugging wasted. |
|
@ibuclaw I have no problem with that idea, but clearly, TLS is used inside the front end (as druntime is using it), and is currently passing all CI tests (therefore, there is no automated test for checking for TLS variables). The result is: the flag isn't doing anything productive. We should either remove the druntime usage (perhaps for a DMD-only build) and enforce that TLS usage is gone from the front end, or figure out a way that front end can reliably use TLS. The current situation is like fixing a bug and not adding a test for it. |
|
So what's the status on this? Maybe we can get an opinion from @andralex / @WalterBright?
I agree. That current status is a weird in-between state in which we have neither of both and it also scares/confuses newcomers with this rather unrelated build error. |
convert gflow.c to D
|
Closing as this isn't very important to me. |
The first
-vtlsflag was added in 7a087dc, but no one seems to know anymore why it was added.AFAICT was
-vtlsis a legacy flag from the long gone migration to shared.Alternative PR: dlang/druntime#2138