[all-commits] [llvm/llvm-project] 0f8159: [libc++] Add a 'is-lockfree-runtime-function' lit ...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Tue Dec 22 04:03:34 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f81598cc1f46b9919b3500d7c4743dd7a5eac1a
      https://github.com/llvm/llvm-project/commit/0f81598cc1f46b9919b3500d7c4743dd7a5eac1a
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-12-22 (Tue, 22 Dec 2020)

  Changed paths:
    M libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
    M libcxx/utils/libcxx/test/features.py

  Log Message:
  -----------
  [libc++] Add a 'is-lockfree-runtime-function' lit feature

On macOS 10.14 /usr/lib/system/libcompiler_rt.dylib contains all the
`__atomic_load*`, etc. functions but does not include the `__atomic_is_lock_free`
function. The lack of this function causes the non-lockfree-atomics feature
to be set to false even though large atomic operations are actually
supported, it's just the is_lock_free() function that is missing.

This is required so that the !non-lockfree-atomics feature can be used
to XFAIL tests that require runtime library support (D88818).

Reviewed By: #libc, ldionne

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


  Commit: 6277bd75dc71ab6cf856ae9a778cab2c90840ca6
      https://github.com/llvm/llvm-project/commit/6277bd75dc71ab6cf856ae9a778cab2c90840ca6
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2020-12-22 (Tue, 22 Dec 2020)

  Changed paths:
    M compiler-rt/test/builtins/Unit/atomic_test.c

  Log Message:
  -----------
  [compiler-rt] Fix atomic_test.c on macOS

The macOS name mangling adds another underscore. Therefore, on macOS
the __atomic_* functions are actually ___atomic_* in libcompiler_rt.dylib.
To handle this case, prepend the asm() argument with __USER_LABEL_PREFIX__
in the same way that atomic.c does.

Reviewed By: ldionne

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


Compare: https://github.com/llvm/llvm-project/compare/00065d5cbd02...6277bd75dc71


More information about the All-commits mailing list