[llvm] [flang-rt] Add the ability to have user supplied callback functions to further customize the runtime environment. (PR #155646)

David Parks via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 12:29:29 PDT 2025


================
@@ -249,4 +262,22 @@ std::int32_t ExecutionEnvironment::UnsetEnv(
   return status;
 }
 
+extern "C" {
+
+// User supplied callback functions to further customize the configuration
+// of the runtime environment.
+// The pre and post callback functions are called upon entry and exit
+// of ExecutionEnvironment::Configure() respectively.
+
+void RTNAME(RegisterConfigureEnv)(
----------------
d-parks wrote:

In the example above, the constructor will be called before `_QQmain`.

https://github.com/llvm/llvm-project/pull/155646


More information about the llvm-commits mailing list