[all-commits] [llvm/llvm-project] ae484c: [TSAN][Darwin] Forward declare spinlock functions ...

thetruestblue via All-commits all-commits at lists.llvm.org
Tue Mar 21 12:26:08 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae484c21c05668f84b13304c28bc39f753e493de
  Author: Blue Gaston <bgaston2 at apple.com>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
    A compiler-rt/lib/tsan/rtl/tsan_spinlock_defs_mac.h

  Log Message:
  [TSAN][Darwin] Forward declare spinlock functions on darwin for TSAN interceptors

Spinlock symbols are removed from headers in MacOS version 10.12 and greater.
Even though they are deprecated, the symbols remain available on the system.

The TSAN interceptors currently cause a build failure after this version because
of the change in availability of the symbol.

We want to continue intercepting the symbols available on the OS.
So we add forward declarations so that the TSAN interceptors can build.

This is tested with the existing osspinlock_norace test.

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

More information about the All-commits mailing list