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
[FR] Support for gold linker for Gradle & CMake #1288
Comments
The first release this could possibly ship in is also the one where gold is deprecated, so I don't think there's much point in fixing this.
Would love a pointer to that bug. We can help chase it. In the mean time, what's the issue with using bfd for aarch64? |
Hi, thanks for your quick reply. Regarding the firebase issues, Here is the first issue. The second issue is the dSym missing function instruction so we don't see anything in Firebase console. I will send the detail later cause it is the email from me to Firebase team. As I recall, we have the linker problem with |
there's a comment on that bug (firebase/firebase-android-sdk#1588 (comment)) claiming that lld in r21d does work:
hopefully they're right! |
Reading through that bug, it sounds like this being a gold or LLD issue is just incidental, and that firebase is prone to crashing on whichever produces that larger output? No one in that bug is reporting this as being an issue with LLD (except maybe one, but I can't tell if they're saying LLD improved it or made it worse), but in fact they report switching to LLD is a possible fix. |
Recheck through that bug and have 2 guys confirm it works with r21d - lld linker. |
After rechecking with default linker (bfd?) on arm64-v8a, everything is work well. |
That's correct. Closing this since I don't think we have anything to do here. Keeping an eye on the firebase bug though. |
When I try to use gold linker to test my sample project, I figure out that Gradle doesn't have an option to do select gold linker.
The available option is '-DANDROID_LD=lld', otherwise, default linker (bfd) will be used.
The build system is Gradle & Cmake.
The suggestion is that have one more option is '-DANDROID_LD=gold'. The solution is simple as we add the code below to android.toolchain.cmake
I have tried to add
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
to CMakeList.txt but it doesn't effect.I guess the linker option is clear when android.toolchain.cmake invoked.
And why I would like to use Gold linker ? because Firebase CrashAnalytics has trouble with dSym parser when the linker is lld. They are working on this issue but have not ETA for it. And for some reason, my team consider to use gold linker until Firebase has the fix for their tool.
The text was updated successfully, but these errors were encountered: