[all-commits] [llvm/llvm-project] ebfeee: [libunwind] Fix testing with sanitizers enabled

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Nov 25 12:28:34 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebfeeec4c4bcc4373e5d5dfaff7ee75959a7c931
      https://github.com/llvm/llvm-project/commit/ebfeeec4c4bcc4373e5d5dfaff7ee75959a7c931
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2021-11-25 (Thu, 25 Nov 2021)

  Changed paths:
    M libcxx/utils/ci/buildkite-pipeline.yml
    M libunwind/test/configs/llvm-libunwind-shared.cfg.in
    M libunwind/test/configs/llvm-libunwind-static.cfg.in
    M libunwind/test/forceunwind.pass.cpp
    M libunwind/test/frameheadercache_test.pass.cpp
    M libunwind/test/libunwind_01.pass.cpp
    M libunwind/test/libunwind_02.pass.cpp
    M libunwind/test/remember_state_leak.pass.sh.s
    M libunwind/test/signal_frame.pass.cpp
    M libunwind/test/signal_unwind.pass.cpp
    M libunwind/test/unw_getcontext.pass.cpp
    M libunwind/test/unwind_leaffunction.pass.cpp

  Log Message:
  -----------
  [libunwind] Fix testing with sanitizers enabled

When testing with sanitizers enabled, we need to link against a plethora
of system libraries. 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. Instead, stop using `-nodefaultlibs` so
that we get the libraries added by default by the compiler.

The only caveat with this approach is that we are now relying on the
fact that `-L <path-to-local-libunwind>` will cause the just built
libunwind to be selected before the system implementation (either of
libunwind or libgcc_s.so), which is somewhat fragile.

This patch also turns the 32 bit multilib build into a soft failure
since we are in the process of removing it anyway, see D114473 for
details. This patch is incompatible with the 32 bit multilib build
because Ubuntu does not provide a proper libstdc++ for 32 bits, and
that is required when running with sanitizers enabled.

Differential Revision: https://reviews.llvm.org/D114385




More information about the All-commits mailing list