[Openmp-dev] Sharing enums between llvm and openmp

Jon Chesterfield via Openmp-dev openmp-dev at lists.llvm.org
Mon Dec 30 04:13:21 PST 2019


This email motivated by D71948, but the question has come up before
without resolution.

The compiler and runtime need to agree on various things. Values of enums,
other constants, typedefs, prototype of functions. Currently we achieve
that through careful programming and review which is slow and a bit fragile.

I don't think building the compiler should depend on the openmp runtime
source (so the compiler can build without openmp).

Someone in a previous review didn't want building the runtime to depend on
the compiler source (so that the runtime can be easily built with other
compilers).

Options seem to be:
1/ Status quo - copy/paste/hope. This is working for us but I don't like
the hope part
2/ Put header files somewhere outside of the llvm / openmp / clang projects
and include
3/ Put header file in the compiler and include it from openmp
4/ Put header file in openmp and include it from the compiler
5/ Other?

I think we should create llvm/CodeGen/OpenMPConstants.h under the llvm tree
and use that. This will fractionally inconvenience downstream people using
llvm's bundled openmp library without llvm in that they'll have to copy the
file out of the llvm tree. That seems fine.

What do we prefer?

Thanks!

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20191230/19037e55/attachment.html>


More information about the Openmp-dev mailing list