This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] libomp: disable definitions of 5.1 atomics for non-x86 arch
ClosedPublic

Authored by AndreyChurbanov on Oct 21 2021, 12:20 PM.

Details

Summary

Declarations of 5.1 atomic entries were added under #if KMP_ARCH_X86 || KMP_ARCH_X86_64 in kmp_atomic.h, but definitions of the functions missed architecture guard in kmp_atomic.cpp.
As a result mangled symbols were available on non-x86 architecture. The patch eliminates these unexpected symbols from the library.

Also tests added in https://reviews.llvm.org/D110109 fixed to be skipped on non supported architectures in a separate NFC commit https://reviews.llvm.org/rG52f4922ebb7b.

Diff Detail