[Chapel Merge] dlopen: Introduce `chpl_rt_prginfo` and program data X-macro

Branch: refs/heads/main
Revision: 6fd65a8db9dcd6803b1824c7eb6e68d0a1b54343
Author: dlongnecke-cray
Link: dlopen: Introduce `chpl_rt_prginfo` and program data X-macro by dlongnecke-cray · Pull Request #28716 · chapel-lang/chapel · GitHub
Log Message:
dlopen: Introduce chpl_rt_prginfo and program data X-macro (#28716)

This PR is another step towards dynamically loading Chapel programs. It
introduces the chpl_rt_prginfo struct and APIs into the runtime.

The files introduced are as follows:

  • chpl-prginfo.h: This is the main header which contains the
    user-facing API and a description of it
  • chpl-prginfo-data-macro.h: This X-macro contains symbols to be
    provided by a Chapel program
  • chpl-prginfo-data-macro-adapter.h: Adapter allowing for easy
    inclusion of the X-macro
  • chpl-prginfo-detail.h: Private implementation details (e.g., for use
    by Chapel programs)
  • chpl-prginfo-launcher.c: Pared down API implemented just for the
    launchers
  • chpl-prginfo.c: Barebones implementation of the API, more to come

Note that some things such as the debug printing for program data
accesses are broken because they rely on currently undefined symbols.
That is OK, those will be provided at a later point.

Reviewed by @jabraham17. Thanks!

Compare: Comparing bfbe44137137d1a907bfb212deb9c0f8c8f7ce9c...01e89819d6c34e609da6e2629c1c6e7b4a0e9f03 · chapel-lang/chapel · GitHub

Diff:
A runtime/include/chpl-prginfo-data-macro-adapter.h
A runtime/include/chpl-prginfo-data-macro.h
A runtime/include/chpl-prginfo-detail.h
A runtime/include/chpl-prginfo.h
M runtime/src/Makefile.share
A runtime/src/chpl-prginfo-launcher.c
A runtime/src/chpl-prginfo.c
https://github.com/chapel-lang/chapel/pull/28716.diff