[compiler-rt] Fix scudo build on ARM
authorLeandro Lupori <leandro.lupori@linaro.org>
Fri, 27 Jan 2023 18:34:00 +0000 (18:34 +0000)
committerLeandro Lupori <leandro.lupori@linaro.org>
Tue, 4 Apr 2023 12:03:36 +0000 (09:03 -0300)
commitf1f3dd64bfd2af94f9cccd01cf9e213fe3e69707
treeb1957a47c28bd431cc152ad236a07eb8a3df7ba3
parent9eda46b1817f60378143846477ef71f0131a121d
[compiler-rt] Fix scudo build on ARM

The build of scudo was failing on armv7l, with undefined references
to unwinder symbols, such as __aeabi_unwind_cpp_pr0. These are
needed by RTGwpAsan and thus, on ARM, scudo must also be linked
against an unwind library.

The cmake command that caused the build failure was:

cmake --fresh -S "$PWD/llvm/" -B "$PWD/build/" -G Ninja \
  -DCMAKE_INSTALL_PREFIX="$PWD/install" \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;clang-tools-extra;polly" \
  -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
  -DLLVM_TOOLCHAIN_TOOLS="llvm-ar;llvm-ranlib;llvm-objdump;\
llvm-rc;llvm-cvtres;llvm-nm;llvm-strings;llvm-readobj;\
llvm-dlltool;llvm-pdbutil;llvm-objcopy;llvm-strip;llvm-cov;\
llvm-profdata;llvm-addr2line;llvm-symbolizer;llvm-windres;llvm-ml;\
llvm-readelf;llvm-size" \
  -DLLVM_INSTALL_BINUTILS_SYMLINKS=OFF -DLLVM_PARALLEL_LINK_JOBS=1

Fixes #60115

Reviewed By: hctim

Differential Revision: https://reviews.llvm.org/D142888
compiler-rt/lib/scudo/standalone/CMakeLists.txt