TLS for iOS - how to proceed

Dan Olson zans.is.for.cans at yahoo.com
Fri Apr 4 09:57:35 PDT 2014


"Joakim" <joakim at airpost.net> 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.

https://developer.apple.com/library/mac/documentation/General/Conceptual/ConcurrencyProgrammingGuide/ConcurrencyandApplicationDesign/ConcurrencyandApplicationDesign.html#//apple_ref/doc/uid/TP40008091-CH100-SW1

> btw, Apple just open-sourced their custom AArch64 backend a week ago:
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-March/071574.html
> https://github.com/llvm-mirror/llvm/tree/master/lib/Target/ARM64
>
> 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.
-- 
Dan


More information about the digitalmars-d-ldc mailing list