[Openmp-commits] [PATCH] D149726: [OpenMP] Use CMAKE_CXX_STANDARD for setting the C++ version

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 3 09:45:19 PDT 2023

tianshilei1992 added a comment.

In D149726#4315736 <https://reviews.llvm.org/D149726#4315736>, @mstorsjo wrote:

> In D149726#4315555 <https://reviews.llvm.org/D149726#4315555>, @tianshilei1992 wrote:
>> `libomp` is widely used and it only uses a small set of C++ features. Due to some historical issue that `libomptarget` and `libomp` are in the same `openmp` directory but their developments are quite diverged. I can see requiring C++17 for `libomp` will definitely break a lot user's build.
> But overall this patch doesn’t change anything of that; if C++17 is supported, such a compiler flag is enabled, if not, the compiler default is used - this is the same behavior as before. The only difference is that it is done in a way that behaves consistently across compilers.

IIUC, if the compiler doesn't support C++17, `libomptarget` will still be enabled with this patch (assuming all the other conditions are met).

>> That will need to be further discussed in our weekly multi-company meeting. The patch mentioned in the description didn't consider the special situation we have for `libomp`. If necessary, we might revert it in the future.
> Sure, that might be for the best. But that patch has been in the tree for almost two months already, and if nobody else has run into issue with it, apparently it’s not an issue in practice?

That's not necessary the case. Most `libomp` users only use release version.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list