@TheBlueMatt unfortunately it’s not the SDK, it’s Apple’s clang itself that had thread_local patched out until xcode 9.0, released in June 2017. And to make it worse, they held off on supporting it because they “didn’t want to commit to an inefficient abi”. It’s that reasoning that makes me believe that a build with an upstream clang may have compatibility issues with end-users’ libc/libstdc++. A few tests might shed some light, but even then, I’d worry about one-off version issues.
So, options are:
– Move forward with thread_local, require mac builders to upgrade to xcode 9, hope for no abi issues
– Wait for xcode 9 to be a reasonable minimum, same as above
– #ifndef __APPLE__ …
– No thread_local for now
Those options ignore mingw, with which @jamesob has also reported some thread_local issues, but I haven’t investigated those.
@sipa I left the thread_local code but undef’d the variable in case we want to go for #3. Otherwise, I begrudgingly agree that it probably shouldn’t be present until it’s usable.
This post was last modified on May 7, 2018, 9:51 pm