Fix #9476: Support native TLS on Mac OS X#5570
Conversation
c2e8c55 to
595328d
Compare
|
Looks like Martin's saying the druntime pull will break some existing shared library functionality. Can that be fixed? |
src/root/port.d
Outdated
| * | ||
| * Returns: a new string which is the concatenation of the two strings | ||
| */ | ||
| static char* concat(/*const*/ char* str1, uint str1Len, /*const*/ char* str2, uint str2Len) |
There was a problem hiding this comment.
Actually, just get rid of concat and use OutBuffer.
There was a problem hiding this comment.
Updated to use OutBuffer.
Yeah, I don't see how my change will break that. He'll have to give a better explanation. |
595328d to
87dcc8b
Compare
|
Is the FreeBSD test expected to fail sometimes? The test output contains |
|
I think we cleared up the misunderstanding with the shared library support that Martin was concerned about dlang/druntime#1461 (comment). |
|
@yebblies @MartinNowak could we try this again? This time all test are passing except for 64bit OS X, which is expected since the druntime part is required as well. |
87dcc8b to
296c8fd
Compare
|
@yebblies @MartinNowak @WalterBright @9rnsr please review. |
|
@jacob-carlborg - something to be aware of. I ran into a possible bug related to OS X TLS after updating to latest Xcode 7.3. See ldc-developers/ldc#1444. Error is @deadalnix - you filed an llvm bug on this I think too. Do you know more on it? My hunch is a linker bug, but I am not sure. |
|
Hmm, that's unfortunate. |
|
@smolt Yes I'm not sure what the problem is. It may well be a binutil problem rather than an llvm one. I'm just not sure. |
|
I was informed my Apple radar bug 25769807 is duplicate of 24667656 which is Closed. I assume that means there will be a fix in an upcoming Xcode release. |
|
So this is an XCode bug ? |
|
Yes, in that Xcode includes entire clang/llvm compile chain. I don't know what specific component has bug, they don't tell me. |
|
I bet on the linker.
|
296c8fd to
d2a3fff
Compare
|
@yebblies Were you able to solve the linker problem ? Was something needed or just updating the linker did the trick ? |
|
Nope. |
|
I got an update to Xcode 7.3.1. I'll have to see if the error goes away when I rerun test suite against LDC. |
|
OK software update somehow screwed up the update on my mac. I was able to get it back in shape and the bug is gone as well. Thanks everybody. |
|
Has anyone benchmarked to check relative performance of accessing TLS vars? |
|
Also confirmed bug is gone Xcode 7.3.1. |
|
WAT? Please prepare a changelog entry mentioning the minimum required OSX and XCode versions, and add some micro-benchmark numbers along with it. |
|
Don't freak out. OSX broke its linker and the fixed it. It doesn't require
|
|
Whatever version it is, you have to tell this to people not involved in this PR. |
|
I believe the bug appeared with linker delivered in Xcode 7.3 and then fixed with Xcode 7.3.1. It affected C code too. @jacob-carlborg I think just a warning to avoid from Xcode 7.3 in change log. We should do that in LDC release notes too. |
|
By linking any program that has tls greater than some non trivial size, in OSX even has an auto update for the thing (it just somehow failed on my
|
|
Well just add the changelog entry, you should inform people about using native TLS anyhow. |
|
@MartinNowak this updates the requirements for OS X as well: dlang/dlang.org#1292. |
Second try at implementing native TLS on OS X. See #5346 for reference.
Runtime part dlang/druntime#1523