[PATCH] D96403: [Android] Use -l:libunwind.a with --rtlib=compiler-rt

Stephen Hines via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 19 19:08:56 PDT 2021


srhines added a comment.

In D96403#2639137 <https://reviews.llvm.org/D96403#2639137>, @smeenai wrote:

> In D96403#2638932 <https://reviews.llvm.org/D96403#2638932>, @rprichard wrote:
>
>> In D96403#2638883 <https://reviews.llvm.org/D96403#2638883>, @smeenai wrote:
>>
>>> With NDK r22, I only see libunwind.a for armv7. Will it be provided for other architectures in future NDK versions?
>>
>> NDK r23 should have a libunwind.a for all architectures. This change isn't in the r23 beta 2 that was just released, but it is in the current NDK canary build at https://ci.android.com/builds/branches/aosp-master-ndk/grid. (e.g. build 7220482 <https://ci.android.com/builds/branches/aosp-master-ndk/grid?head=7220482&tail=7220482>).
>
> Got it, thanks.
>
> Is there a public repository for viewing the libunwind source state that the NDK r23 libunwind is built from? I have the AOSP source tree checked out (following the instructions in https://source.android.com/setup/build/downloading) on the llvm-toolchain manifest branch. toolchain/llvm-project inside that checkout (https://android.googlesource.com/toolchain/llvm-project) has a branch for ndk-release-r23, but the merge base of that branch and upstream LLVM main is from April 29 2020, and I don't see many newer changes to libunwind after that, so I wasn't sure I was looking at the right place. I know you've done a bunch more libunwind work since then (e.g. D87750 <https://reviews.llvm.org/D87750>, D87881 <https://reviews.llvm.org/D87881>, and D90898 <https://reviews.llvm.org/D90898>), so I was curious if those were gonna be part of r23's libunwind.

So libunwind is now produced as a prebuilt with the rest of the toolchain build, and not built from that copy of `toolchain/llvm_project` from the NDK packaging/release branch. Thus if you want to rebuild/examine the sources, you need to look at the toolchain that was included for NDK r23, which is `clang-r399163b` (from https://android.googlesource.com/platform/ndk/+/refs/tags/ndk-r23-beta2/ndk/toolchains.py#25). Given that, you can get the manifest for the toolchain directly here <https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/tags/ndk-r23-beta2/clang-r399163b/manifest_6875598.xml>. You can use that manifest to check out the exact sources that were used to build everything (following instructions from here <https://android.googlesource.com/toolchain/llvm_android/#instructions-to-rebuild-a-particular-toolchain-release>).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96403/new/

https://reviews.llvm.org/D96403



More information about the cfe-commits mailing list