-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang LTO + thread_local is broken #156
Comments
I doubt we can do anything about this without a repro case. |
Just figured out a reproducer:
|
Great, thanks. |
I don't think clang emutls support has shipped in an NDK yet. |
@stephenhines Hrm? The NDK's |
So, the test case that you have is something we can't support right now anyway. I think there's still a bug here not related to that, but just FYI that non-trivial @dimitry- thinks this is probably related to https://llvm.org/bugs/show_bug.cgi?id=24135
It has (afaik), but actually the repro case in question is a different story. Strictly speaking we support |
That's my guess too, I was just gonna post it.
Yep, the toolchain I was using for the repro is actually clang with gnustl. gnustl provides a fallback
If you're talking about http://reviews.llvm.org/D21803, then that's my patch :). Hope it lands soon and you guys pick it up. For now I'm just rolling it into my own codebase. |
We've gotten our libc++ updates in shape now, so we should be able to pick it up whenever it lands. Will definitely be a great thing to have. Thanks for contributing! |
I thought I might be able to work around that LLVM bug with |
https://reviews.llvm.org/D21803 is merged now FYI |
I may not have time to do this for r14 given that unified headers still aren't quite ready, but I'll aim for that. |
@DanAlbert Okay cool, should we split that into a separate issue?
still happens regardless. |
Ah, yes. Agreed. Opened #216. |
The bug still exist in ndk r15b |
Actually, I just forgot to close the bug. The test case in #156 (comment) works now. |
Some libraries/executables I've built with clang and
-flto
give the following error:Or for shared libs:
objdump -tT
doesn't show anything strange that I can see, so I'm not sure why the runtime linker thinks it needs an empty-named symbol.The text was updated successfully, but these errors were encountered: