TLS for iOS - how to proceed

Dan Olson at
Fri Apr 4 09:57:35 PDT 2014

"Joakim" <joakim at> writes:

> OK, I don't think that should preclude letting people know on
> D.announce, once you put your source and some build instructions
> online.  You might get some help with the remaining porting work.

Sounds good, something to work on this weekend to get my github filled
with build notes and other goodies.

I am dithering on whether to put in a flag to compile without TLS
support with a warning when each thread local is compiled. Then iOS ldc
can be build with released llvm-3.4 or 3.5. Only the phobos
std.concurrency unittest was fixed by adding TLS support. I have an
explicit ThreadLocal type used in Thread/Fiber classes so they don't
need TLS to work properly.

Apple recommends that iPhone apps don't make use of threads directly and
use Grand Central Dispatch to manage concurrency. It may be that a
non-TLS version of D for iOS will work just fine for most uses.

> btw, Apple just open-sourced their custom AArch64 backend a week ago:
> If you have any hardware with their 64-bit A7 chip, it might be
> interesting to see if you can get D running on 64-bit iOS also. :)

I noticed as I was getting ready to upgrade my llvm source tree. I saw
the new arm64 target files under the ARM tree that iPhone SDK uses. I
don't have any h/w to support it yet but would be fun to try. I did get
some older h/w though and was going to see if things compile fine to
armv6 too.

More information about the digitalmars-d-ldc mailing list