[Openmp-commits] [PATCH] D49386: Make tests unsupported if libatomic cannot be found.

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 16 11:22:32 PDT 2018

Hahnfeld added a comment.

In https://reviews.llvm.org/D49386#1163854, @Hahnfeld wrote:

> @ABataev does this mean that Clang will now require `libatomic` even if there is no OpenMP `atomic` construct? I remember documentation saying that the user has to link atomic libraries when needed...

(I've replied on `cfe-commits` to the commit that introduced linking of `-latomic` because I don't think it's a good idea.)

Comment at: runtime/test/lit.cfg:56-57
     libs += " -latomic"
+elif '-fopenmp' in config.test_openmp_flags:
+    config.unsupported = True
twoh wrote:
> Hahnfeld wrote:
> > I think what you want to test here is whether you are compiling with Clang? If so, please use `config.test_c_compiler` or `config.test_compiler_features`.
> Thanks for the comment! I couldn't quite get it why are you thinking that I want to check if the compiler is clang. Following https://reviews.llvm.org/rL336467, `-latomic` is added if `-fopenmp` is given, so that's what I'm checking here. Don't all test cases here assume that they are compiling with clang?
No, the tests can be run with GCC, Intel Compiler and maybe others. The test in its current form is pointless because all OpenMP tests get `-fopenmp`.

  rOMP OpenMP


More information about the Openmp-commits mailing list