[Chapel Merge] dlopen: Fix issues with `--incremental` and C backend

Branch: refs/heads/main
Revision: eb0a4176e37175405dbfe132fc0b6db9e6259ba0
Author: dlongnecke-cray
Link: dlopen: Fix issues with `--incremental` and C backend by dlongnecke-cray · Pull Request #28862 · chapel-lang/chapel · GitHub
Log Message:
dlopen: Fix issues with --incremental and C backend (#28862)

This PR should fix failures in nightly testing, specifically those tests
exercising incremental compilation.

It does so by introducing a runtime header that is only intended for use
by compiled Chapel programs, and puts declarations of some
code-generated symbols into that header. This is a workaround for those
declarations being removed from chplcgfns.h, which we appear to rely
upon for ensuring visibility.

  • standard
  • C backend

Reviewed by @jabraham17. Thanks!

Compare: Comparing 370d02c7713af50f9bd7306b658b59e7814c25d2...e8b6f0cefed0b06a5b2b5956866bf9f02341fe23 · chapel-lang/chapel · GitHub

Diff:
M compiler/codegen/codegen.cpp
A runtime/include/chpl-prginfo-program-only-decls.h
M runtime/include/stdchpl.h
https://github.com/chapel-lang/chapel/pull/28862.diff