Skip to content

Commit

Permalink
Rollup merge of rust-lang#137192 - kornelski:windows-tls-lto, r=Chris…
Browse files Browse the repository at this point in the history
…Denton

Remove obsolete Windows ThinLTO+TLS workaround

The bug rust-lang#109797 has been fixed by rust-lang#129079, so this workaround is no longer needed.
  • Loading branch information
workingjubilee authored Feb 20, 2025
2 parents 8af2873 + 40ecda6 commit 272e1e6
Showing 1 changed file with 1 addition and 3 deletions.
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

0 comments on commit 272e1e6

Please sign in to comment.