Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove obsolete MinGW ThinLTO+TLS workaround
#109797 is fixed
  • Loading branch information
kornelski committed Feb 17, 2025
commit 40ecda6a33bdfb4ca66ecb5555473511a9b1b9f6
4 changes: 1 addition & 3 deletions library/std/src/sys/thread_local/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ pub macro thread_local_inner {
// user provided type or type alias with a matching name. Please update the shadowing test
// in `tests/thread.rs` if these types are renamed.
unsafe {
// Inlining does not work on windows-gnu due to linking errors around
// dllimports. See https://github.com/rust-lang/rust/issues/109797.
$crate::thread::LocalKey::new(#[cfg_attr(windows, inline(never))] |init| {
$crate::thread::LocalKey::new(|init| {
static VAL: $crate::thread::local_impl::Storage<$t>
= $crate::thread::local_impl::Storage::new();
VAL.get(init, __init)
Expand Down
Loading