As https://reviews.llvm.org/rL336467 appends -latomic when -fopenmp is given, openmp unit tests are failing if libatomic cannot be found. This diff makes unit tests unsupported if there's no libatomic.
From the build dir
[~/llvms/upstream-git/build-Release] grep -r LIBOMP_HAVE_LIBATOMIC . ./CMakeCache.txt:LIBOMP_HAVE_LIBATOMIC:INTERNAL=
suggests that libatomic cannot be found. Without the diff,
[~/llvms/upstream-git/build-Release] ninja check-openmp ... libomp :: worksharing/single/omp_single.c libomp :: worksharing/single/omp_single_copyprivate.c libomp :: worksharing/single/omp_single_nowait.c libomp :: worksharing/single/omp_single_private.c Expected Passes : 2 Expected Failures : 1 Unsupported Tests : 2 Unexpected Failures: 166
With the diff,
[~/llvms/upstream-git/build-Release] ninja check-openmp [0/1] Running OpenMP tests Testing Time: 0.16s Expected Passes : 2 Unsupported Tests : 169