[all-commits] [llvm/llvm-project] ccbab5: [compiler-rt] Fix scudo build on ARM

Leandro Lupori via All-commits all-commits at lists.llvm.org
Thu Apr 27 05:02:42 PDT 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: ccbab5979b7bd594314b50f4fc54ec57a676f391
      https://github.com/llvm/llvm-project/commit/ccbab5979b7bd594314b50f4fc54ec57a676f391
  Author: Leandro Lupori <leandro.lupori at linaro.org>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/CMakeLists.txt

  Log Message:
  -----------
  [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

(cherry picked from commit e1e972689b9138db795885a5468a15aafbe7cb51)


  Commit: bd6783b380768bd35f37e0034dccf6c5736dd031
      https://github.com/llvm/llvm-project/commit/bd6783b380768bd35f37e0034dccf6c5736dd031
  Author: Leandro Lupori <leandro.lupori at linaro.org>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M compiler-rt/cmake/Modules/CompilerRTUtils.cmake

  Log Message:
  -----------
  [compiler-rt] Fix invalid triple on ARM build

The fuzzer build was failing on armv7l, with an invalid triple
error. This happened because CMake's get_compiler_rt_target
function was missing some code to correctly handle arm archs,
such as armhf.

This was originaly part of https://reviews.llvm.org/D140011, that
landed on main with commit cd173cbd7cca69c29df42cd4b42e60433435c29b.

Fixes #60115

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


Compare: https://github.com/llvm/llvm-project/compare/464bda7750a3...bd6783b38076


More information about the All-commits mailing list