www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - iOS natively supports thread-locals

reply Dan Olson <gorox comcast.net> writes:
Good news!  I just did a simple LDC test of thread locals using vanilla
LLVM 3.8.0 and Xcode 3.7.1.  Targeted both arm64 (iPhone 6) and armv7
(older iPad mini) running iOS 9.3.2.  This paves the way for ditching my
modified LLVM.

Was there an Apple announcement about this?

I am not sure when this came about.  It snuck in sometime between Jan
2016 and the LLVM 3.8.0 release in early March.  I noticed when trying
to cherry-pick my thread-local changes today into a 3.8.0 release and
there was conflict.  Looking at the code, there it was, TLS support.

I think device needs to be running at least iOS 9.0 for armv7 and 8.0
for arm64.  Doesn't work yet in iOS Simulator for 32-bit though.
-- 
Dan
Jun 18 2016
next sibling parent Joakim <dlang joakim.fea.st> writes:
On Sunday, 19 June 2016 at 02:40:51 UTC, Dan Olson wrote:
 Good news!  I just did a simple LDC test of thread locals using 
 vanilla LLVM 3.8.0 and Xcode 3.7.1.  Targeted both arm64 
 (iPhone 6) and armv7 (older iPad mini) running iOS 9.3.2.  This 
 paves the way for ditching my modified LLVM.

 Was there an Apple announcement about this?

 I am not sure when this came about.  It snuck in sometime 
 between Jan 2016 and the LLVM 3.8.0 release in early March.  I 
 noticed when trying to cherry-pick my thread-local changes 
 today into a 3.8.0 release and there was conflict.  Looking at 
 the code, there it was, TLS support.

 I think device needs to be running at least iOS 9.0 for armv7 
 and 8.0 for arm64.  Doesn't work yet in iOS Simulator for 
 32-bit though.
Looks like this commit, ARM-only for now: http://llvm.org/viewvc/llvm-project?view=revision&revision=257039
Jun 18 2016
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2016-06-19 04:40, Dan Olson wrote:
 Good news!  I just did a simple LDC test of thread locals using vanilla
 LLVM 3.8.0 and Xcode 3.7.1.  Targeted both arm64 (iPhone 6) and armv7
 (older iPad mini) running iOS 9.3.2.  This paves the way for ditching my
 modified LLVM.
Aha, interesting. Does the implementation look like the one for OS X or is completely different? -- /Jacob Carlborg
Jun 19 2016
parent Dan Olson <gorox comcast.net> writes:
Jacob Carlborg <doob me.com> writes:

 On 2016-06-19 04:40, Dan Olson wrote:
 Good news!  I just did a simple LDC test of thread locals using vanilla
 LLVM 3.8.0 and Xcode 3.7.1.  Targeted both arm64 (iPhone 6) and armv7
 (older iPad mini) running iOS 9.3.2.  This paves the way for ditching my
 modified LLVM.
Aha, interesting. Does the implementation look like the one for OS X or is completely different?
It looks the same as OS X.
Jun 20 2016