llvm-project/openmp
Michal Gorny 018d13597a [test] Try to link -latomic to provide atomics when available
When using -rtlib=libgcc, the fallback implementation of __atomic_*
builtins is provided via libatomic (included in GCC). However, neither
GCC itself nor clang link libatomic implicitly, and it seems that GCC
upstream expects projects to link it explicitly as necessary.

Since compiler-rt provides __atomic_* builtins directly in the main
library, check if they are provided by the default libraries first.
If they are not, check if -latomic is available to provide them
and add explicit -latomic for tests in this case.

This fixes unresolved __atomic_load() references when running openmp
tests on i386 with libgcc backend.

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

llvm-svn: 296183
2017-02-24 22:15:24 +00:00
..
libomptarget [OpenMP] libomptarget: Protect parent struct from being deallocated 2017-02-15 20:45:37 +00:00
offload Liboffload: Patch for MPSS > 3.4.x (provided by Tim Cramer) 2015-05-06 10:58:40 +00:00
runtime [test] Try to link -latomic to provide atomics when available 2017-02-24 22:15:24 +00:00
testsuite Apply name change to testsuite file. 2015-06-01 04:24:23 +00:00
www Support of mips & mips64 for openmprtl 2016-12-08 09:22:24 +00:00
CMakeLists.txt libomptarget: Disable on Win32 2017-02-10 17:13:28 +00:00
CREDITS.txt Fork performance improvements 2016-05-23 18:01:19 +00:00
LICENSE.txt Update copyright year in LICENSE.txt 2016-05-17 20:11:26 +00:00