diff options
| author | bors <bors@rust-lang.org> | 2021-04-25 04:45:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-25 04:45:39 +0000 |
| commit | 5da10c01214a3d3ebec65b8ba6effada92a0673f (patch) | |
| tree | 94bbe380b059b6f77025a1e7c8d290f62390998e /compiler/rustc_codegen_llvm/src | |
| parent | f7c468fe9a1448b1f6ceee6a4c831fe6122a54f0 (diff) | |
| parent | 7171fec13f3a3091f702a8e55f495ad1563dc4cd (diff) | |
| download | rust-5da10c01214a3d3ebec65b8ba6effada92a0673f.tar.gz rust-5da10c01214a3d3ebec65b8ba6effada92a0673f.zip | |
Auto merge of #84115 - CDirkx:rt, r=m-ou-se
Rework `init` and `cleanup` This PR reworks the code in `std` that runs before and after `main` and centralizes this code respectively in the functions `init` and `cleanup` in both `sys_common` and `sys`. This makes is easy to see what code is executed during initialization and cleanup on each platform just by looking at e.g. `sys::windows::init`. Full list of changes: - new module `rt` in `sys_common` to contain `init` and `cleanup` and the runtime macros. - `at_exit` and the mechanism to register exit handlers has been completely removed. In practice this was only used for closing sockets on windows and flushing stdout, which have been moved to `cleanup`. - <s>On windows `alloc` and `net` initialization is now done in `init`, this saves a runtime check in every allocation and network use.</s>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
