[libcxx-commits] [PATCH] D79904: [libcxx][libcxxabi] Link against libdl on Android
Ryan Prichard via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 13 17:29:43 PDT 2020
rprichard added a comment.
In D79904#2035411 <https://reviews.llvm.org/D79904#2035411>, @smeenai wrote:
> In D79904#2035404 <https://reviews.llvm.org/D79904#2035404>, @compnerd wrote:
>
> > Why can we not use `${CMAKE_DL_LIBS}` instead of explicitly detecting libdl and linking against it?
>
>
> Because I wasn't aware of its existence :D Happy to switch to that.
It looks like glibc/musl's libc.so exports dl_iterate_phdr, so even libgcc_s.so doesn't depend on libdl.so. Bionic's libc.so mostly doesn't expose the unwinding dl* APIs, but its libc.a does. (exception: arm32 libc.so exports __gnu_Unwind_Find_exidx)
I would guess that using ${CMAKE_DL_LIBS} would link libc++abi.so against libdl.so on GNU/Linux systems, which is unnecessary and would make any C++ program implicitly link against libdl.so?
Given that ${CMAKE_DL_LIBS} is specified by CMake, I'm wondering how well it works with cross-compilation. I'd guess that it ought to work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79904/new/
https://reviews.llvm.org/D79904
More information about the libcxx-commits
mailing list