Re:LLVM 6.0.0 Release
by cozzyd on Thursday March 08, 2018 @10:49AM
(#16545028)
I can't remember, has Apple bothered enabling thread-local storage in its clang distribution yet?
[ Parent
| on HN ]
Apple's clang supports thread_local as of XCode 8: https://stackoverflow.com/questions/28094794/why-does-apple-...
Better late than never, I suppose. The answer indicates it might be ABI incompatible with upstream clang though? I'm sure that can cause a lot of fun...
Re:LLVM 6.0.0 Release
by ComputerGuru on Thursday March 08, 2018 @11:24AM
(#16545347)
The last time I checked, only for POC. In my uuid library [0], macOS is basically the only one I can’t create a per-thread rng and instead have to spin up a new one each time.
It's frustrating, because TLS works fine on vanilla clang or newish gcc on Mac OS x.
FWIW, macOS has arc4random(3) and arc4random_buf(3).
Re:LLVM 6.0.0 Release
by ComputerGuru on Thursday March 08, 2018 @03:02PM
(#16547183)
Thank you. It was supposed to be a platform-agnostic uuid library embracing the benefits of C++11 and beyond. But that was a pipe dream :)