Working LDC iOS (iPhone) on github

Jacob Carlborg doob at me.com
Sun Feb 16 04:43:10 PST 2014


On Saturday, 15 February 2014 at 15:13:07 UTC, David Nadlinger 
wrote:

> The big question is how to best implement it, though.
>
> From an LDC perspective, the best would be to add support for 
> emitting the TLS variables into a bracketed section and 
> inserting runtime calls to access them directly to LLVM; then 
> none of the LDC code (resp. the generated LLVM IR) would 
> actually have to change.

At least DMD had some problems with bracketed sections with the 
linker. DMD doesn't use bracketed sections anymore. Why do you 
need bracketed sections? At least OS X has API's available to 
access a specific sections. I would assume iOS also has does 
API's.

Would it be possible to output OS X native TLS for iOS? Does LLVM 
allow that? If that's possible we could experiment with adding 
the TLS code from the dynamic linker to druntime and see what 
happens. Theoretically it should work. It don't think the dynamic 
linker does anything that a regular application can't do.

--
/Jacob Carlborg



More information about the digitalmars-d-ldc mailing list