diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-03-04 17:14:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 10:14:25 +0100 |
commit | e217bb24a1e5b92d448bf7afa2488bec89b94cfb (patch) | |
tree | 96beeda13fe7db4c21e28b0ae5985a8408023f97 /doc | |
parent | 6e875cd7c2b4659f46199593cacf5fced653b660 (diff) | |
download | Nim-e217bb24a1e5b92d448bf7afa2488bec89b94cfb.tar.gz |
fixes #20945; fixes #18262; provides C API `NimDestroyGlobals` for static/dynlib libraries (#23357)
fixes #20945 fixes #18262 todo - [ ] perhaps export with lib prefix when the option is enabled
Diffstat (limited to 'doc')
-rw-r--r-- | doc/backends.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/backends.md b/doc/backends.md index 27b654890..996ffd2f9 100644 --- a/doc/backends.md +++ b/doc/backends.md @@ -250,6 +250,8 @@ which will likely make your program crash at runtime. The name `NimMain` can be influenced via the `--nimMainPrefix:prefix` switch. Use `--nimMainPrefix:MyLib` and the function to call is named `MyLibNimMain`. +When compiling to static or dynamic libraries, they don't call destructors of global variables as normal Nim programs would do. A C API `NimDestroyGlobals` is provided to call these global destructors. + ### Nim invocation example from C |