[libcxx-commits] [PATCH] D111290: [libunwind] Fix test execution.
Alexander Richardson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 7 03:20:25 PDT 2021
arichardson added inline comments.
================
Comment at: libunwind/test/libunwind/test/config.py:70
+ if sanitizers is not None:
+ super().configure_link_flags_cxx_library()
----------------
Why do we need the C++ library?
I can see the following issue:
```
$ nm -D -u /usr/lib/gcc/x86_64-linux-gnu/7/libasan.so
U _Unwind_Backtrace
U _Unwind_GetIP
```
```
readelf --dynamic /usr/lib/gcc/x86_64-linux-gnu/7/libasan.so
Dynamic section at offset 0x151550 contains 31 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x000000000000000e (SONAME) Library soname: [libasan.so.4]
```
And on Ubuntu clang's libclang-rt even links against libstdc++...
```
$ readelf --dynamic /usr/lib/clang/10/lib/linux/libclang_rt.asan-x86_64.so
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x000000000000000e (SONAME) Library soname: [libclang_rt.asan-x86_64.so]
```
Is that the problem?
I don't think we should be linking against the C++ library since that might pull in another unwind library.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111290/new/
https://reviews.llvm.org/D111290
More information about the libcxx-commits
mailing list