[all-commits] [llvm/llvm-project] 0b2d5f: [compiler-rt][Sanitizer] Link sanitizer libs with ...

rorth via All-commits all-commits at lists.llvm.org
Wed Jul 27 03:30:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b2d5fd48bc281af89e5e7bfa33a3054b826ed52
      https://github.com/llvm/llvm-project/commit/0b2d5fd48bc281af89e5e7bfa33a3054b826ed52
  Author: Rainer Orth <ro at CeBiTec.Uni-Bielefeld.DE>
  Date:   2022-07-27 (Wed, 27 Jul 2022)

  Changed paths:
    M compiler-rt/CMakeLists.txt

  Log Message:
  -----------
  [compiler-rt][Sanitizer] Link sanitizer libs with -latomic on SPARC

When building on Linux/sparc64, the 32-bit `libclang_rt.asan.so`,
`libclang_rt.ubsan_minimal.so`, and `libclang_rt.ubsan_standalone.so`
failed to link with undefined references to 64-bit atomics, which `clang`
cannot inline.  Even D130569 <https://reviews.llvm.org/D130569> didn't help
because those libraries are linked with `-nodefaultlibs`, so dependent
libraries need to be added explicitly.

That's what this patch does.

Tested on `sparc64-unknown-linux-gnu` and `sparcv9-sun-solaris2.11`.

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




More information about the All-commits mailing list