Skip to content

Commit

Permalink
Auto merge of rust-lang#137192 - kornelski:windows-tls-lto, r=<try>
Browse files Browse the repository at this point in the history
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.

try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: i686-msvc-1
try-job: i686-msvc-2
try-job: x86_64-msvc-ext1
try-job: x86_64-msvc-ext2
try-job: x86_64-msvc-ext3
try-job: dist-x86_64-msvc
try-job: dist-i686-msvc
try-job: dist-aarch64-msvc
  • Loading branch information
bors committed Feb 18, 2025
2 parents aaa8614 + 40ecda6 commit 334513b
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 334513b

Please sign in to comment.