This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Remove explicit Android libatomic linking
ClosedPublic

Authored by smeenai on Aug 24 2023, 4:20 PM.

Details

Summary

The comments date back to NDK r10, which is ancient. libatomic isn't
always needed anymore, and even when it is, it's bundled into
compiler-rt in the NDK so we'll get it automatically. Remove the
unnecessary explicit links.

Diff Detail

Event Timeline

smeenai created this revision.Aug 24 2023, 4:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:20 PM
smeenai requested review of this revision.Aug 24 2023, 4:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2023, 4:20 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
srhines accepted this revision.Aug 24 2023, 4:58 PM
This revision is now accepted and ready to land.Aug 24 2023, 4:58 PM
This revision was automatically updated to reflect the committed changes.

Not sure which one, but one of your patches breaks https://lab.llvm.org/buildbot/#/builders/77/builds/30001

Thanks for the heads up. I'm pretty sure it's D158792, specifically the part that defaults compiler-rt to using the builtins library. I reverted it for now and I'm monitoring the bot.

It's not urgent, but I'd like to reland that patch eventually though, since it reflects modern Android defaults. Looking at the buildbot Android scripts, I had a few questions:

  • They're using NDK r21, which is unsupported. Are there any plans to upgrade to r23 or newer, since that would get us a fully LLVM-based toolchain and is what the Clang driver's Android defaults reflect now?
  • It seems like they're building compiler-rt without the builtins. Would you be open to doing a builtins build before the compiler-rt build (which also mirrors how the LLVM runtimes build works)? It should be pretty quick to do so.

I'm happy to take a crack at both of those changes myself, but I'd need a way to eventually test on the buildbots to make sure things work.

It's not urgent, but I'd like to reland that patch eventually though, since it reflects modern Android defaults. Looking at the buildbot Android scripts, I had a few questions:

  • They're using NDK r21, which is unsupported. Are there any plans to upgrade to r23 or newer, since that would get us a fully LLVM-based toolchain and is what the Clang driver's Android defaults reflect now?
  • It seems like they're building compiler-rt without the builtins. Would you be open to doing a builtins build before the compiler-rt build (which also mirrors how the LLVM runtimes build works)? It should be pretty quick to do so.

I'm happy to take a crack at both of those changes myself, but I'd need a way to eventually test on the buildbots to make sure things work.

Thanks. That could be very helpful.
That script should run on usual Debian distro, and it try to run tests on anything it can see on ADB. So you can start with that.
I unlikely have a way to provide access to that bot to you, but that bot is relatively fast. So I can try patches for you, but also we can just land/revert them as needed.