about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-01 19:34:21 +0000
committerbors <bors@rust-lang.org>2015-09-01 19:34:21 +0000
commitcb9323ec096dbc4b3766b770309102c7e2ed9875 (patch)
tree74bbd80f6571a845afb07055fe59498b7bbd1fc2 /src/libstd/sys/unix/stack_overflow.rs
parent5c7c5bb1e1e33bb5b59585054f7f5526be7ee565 (diff)
parent9a3acece30414a2d306102ec4e6faac0b6f3c482 (diff)
downloadrust-cb9323ec096dbc4b3766b770309102c7e2ed9875.tar.gz
rust-cb9323ec096dbc4b3766b770309102c7e2ed9875.zip
Auto merge of #28130 - alexcrichton:fix-msvc-static-tls-dtor, r=brson
Running TLS destructors for a MSVC Windows binary requires the linker doesn't
elide the `_tls_used` or `__tls_used` symbols (depending on the architecture).
This is currently achieved via a `#[link_args]` hack but this only works for
dynamically linked binaries because the link arguments aren't propagated to
statically linked binaries.

This commit alters the strategy to instead emit a volatile load from those
symbols so LLVM can't elide it, forcing the reference to the symbol to stay
alive as long as the callback function stays alive (which we've made sure of
with the `#[linkage]` attribute).

Closes #28111
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions