std: Flag Windows TLS dtor symbol as #[used]
Turns out ThinLTO was internalizing this symbol and eliminating it. Worse yet if you compiled with LTO turns out no TLS destructors would run on Windows! The `#[used]` annotation should be a more bulletproof implementation (in the face of LTO) of preserving this symbol all the way through in LLVM and ensuring it makes it all the way to the linker which will take care of it.
This commit is contained in:
parent
47498dea09
commit
95e9609b9d
3 changed files with 44 additions and 1 deletions
|
@ -332,6 +332,7 @@
|
|||
#![feature(doc_spotlight)]
|
||||
#![cfg_attr(test, feature(update_panic_count))]
|
||||
#![cfg_attr(windows, feature(const_atomic_ptr_new))]
|
||||
#![cfg_attr(windows, feature(used))]
|
||||
|
||||
#![default_lib_allocator]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue