[PATCH] D114385: [libunwind] Fix testing with sanitizers enabled
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 14:58:43 PST 2021
MaskRay added inline comments.
================
Comment at: libunwind/test/configs/llvm-libunwind-shared.cfg.in:50
config.substitutions.append(('%{link_flags}',
- '-nodefaultlibs -L {0} -Wl,-rpath,{0} -lunwind -ldl -lc {1}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
+ '-L {0} -Wl,-rpath,{0} -lunwind {1}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
))
----------------
`-ldl` needs to be retained, otherwise on Linux x86-64:
```
ld.lld: error: undefined symbol: dladdr
>>> referenced by forceunwind.pass.cpp
>>> /tmp/forceunwind-7489af.o:(stop(int, _Unwind_Action, unsigned long, _Unwind_Exception*, _Unwind_Context*, void*))
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
error: command failed with exit status: 1
--
********************
********************
Failed Tests (3):
llvm-libunwind-shared.cfg.in :: forceunwind.pass.cpp
llvm-libunwind-shared.cfg.in :: signal_unwind.pass.cpp
llvm-libunwind-shared.cfg.in :: unwind_leaffunction.pass.cpp
```
================
Comment at: libunwind/test/configs/llvm-libunwind-static.cfg.in:50
config.substitutions.append(('%{link_flags}',
- '-nodefaultlibs {}/libunwind.a -ldl -lc {}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
+ '{}/libunwind.a {}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
))
----------------
ditto for -ldl
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114385/new/
https://reviews.llvm.org/D114385
More information about the llvm-commits
mailing list