about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back/link.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-07-31 10:44:11 +0000
committerbors <bors@rust-lang.org>2022-07-31 10:44:11 +0000
commit76822a28780a9a93be04409e52c5df21663aab97 (patch)
tree7406e364a2ebce5311f085ba23ee7394bb5bd176 /compiler/rustc_codegen_ssa/src/back/link.rs
parent482153bc208df5fc236cc0e1cddb24e93fcc332f (diff)
parent698d4a86c647e4dd44eb83fc717d48153b82bd6c (diff)
downloadrust-76822a28780a9a93be04409e52c5df21663aab97.tar.gz
rust-76822a28780a9a93be04409e52c5df21663aab97.zip
Auto merge of #99553 - ChrisDenton:lazy-compat-fn, r=Mark-Simulacrum
Rewrite Windows `compat_fn` macro

This allows using most delay loaded functions before the init code initializes them. It also only preloads a select few functions, rather than all functions.

This is optimized for the common case where a function is used after already being loaded (or failed to load). The only change in codegen at the call site is to use an atomic load instead of a plain load, which should have negligible or no impact.

I've split the old `compat_fn` macro in two so as not to mix two different use cases. If/when Windows 7 support is dropped `compat_fn_optional` can be removed entirely.

r? rust-lang/libs
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back/link.rs')
0 files changed, 0 insertions, 0 deletions