[libcxx-commits] [PATCH] D114385: [libunwind] Fix testing with sanitizers enabled

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 22 15:02:28 PST 2021


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

> When testing with sanitizers enabled, we need to link against a plethora of system libraries.

I do now know how to enable sanitizers for `ninja check-unwind`.

`-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_USE_SANITIZER=Address -DLLVM_ENABLE_PROJECTS='clang' -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind;compiler-rt'` doesn't pass `-fsanitize=` to `ninja check-unwind` tests.

> Using -nodefaultlibs like we used to breaks this, and we would have to add all these system libraries manually, which is

not portable and error prone.

That said, I agree with removing `-nodefaultlibs`.

The tests will pass if -ldl is added back.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114385



More information about the libcxx-commits mailing list