Skip to content
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

druntime: Simplify & somewhat accelerate getTLSRange() on Darwin #3942

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kinke
Copy link
Member

@kinke kinke commented Mar 12, 2022

No description provided.

@kinke
Copy link
Member Author

kinke commented Mar 12, 2022

If this works, the shared libs support for macOS should be upstreamable without requiring DMD compiler changes. FYI @jacob-carlborg.

@kinke
Copy link
Member Author

kinke commented Mar 12, 2022

A PITA without being able to test locally. Maybe the TLS block incl. TLVDescriptor are lazily allocated, so that it was with the previous getTLSAnchor() call but now isn't anymore (or rather, too late).

@jacob-carlborg
Copy link
Contributor

If this works, the shared libs support for macOS should be upstreamable without requiring DMD compiler changes

Even though this change won't require DMD compiler changes, this change will not make dynamic libraries with DMD, right?

@jacob-carlborg
Copy link
Contributor

A PITA without being able to test locally.

I recommend setting up a VM with macOS. Here's some instructions: https://gist.github.com/MartinNowak/8156507.

@kinke
Copy link
Member Author

kinke commented Mar 13, 2022

this change will not make dynamic libraries with DMD, right?

Not alone; the according rt.sections_elf_shared modifications would need to be upstreamed of course, but that should be almost it. Perhaps still requires a tiny DMD adaptation to emit the CompilerDSOData struct and d_dso_register calls as on Linux, the only difference being a different mangle for the bracketing symbols, but at least no extra getTLSAnchor() function + TLS global in each object file anymore.

I recommend setting up a VM with macOS.

If I really wanted to I'd have one, but I don't and definitely don't plan to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants