diff options
| author | gingerBill <bill@gingerbill.org> | 2022-01-12 20:13:38 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-01-12 20:13:38 +0000 |
| commit | 75b7f2b9feada3cf6ed8aab5142e078d7b07ed59 (patch) | |
| tree | 18decf5cb4192396836705c054b7d6771297094e | |
| parent | f1521aa980da5753a6ba6ea951d1cb2ebfd0e66a (diff) | |
Correct `-init` for *nix to be a different procedure
| -rw-r--r-- | core/runtime/proc_unix.odin | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/runtime/proc_unix.odin b/core/runtime/proc_unix.odin new file mode 100644 index 000000000..7e0d1055a --- /dev/null +++ b/core/runtime/proc_unix.odin @@ -0,0 +1,18 @@ +//+private +//+build linux, darwin +package runtime + +import "core:intrinsics" + +when ODIN_BUILD_MODE == "dynamic" { + @(link_name="_odin_entry_point", linkage="strong", require) + _odin_entry_point :: proc "c" () { + context = default_context() + #force_no_inline _startup_runtime() + } + @(link_name="_odin_exit_point", linkage="strong", require) + _odin_exit_point :: proc "c" () { + context = default_context() + #force_no_inline _cleanup_runtime() + } +}
\ No newline at end of file |