Skip to content

Commit

Permalink
Rollup merge of rust-lang#109806 - Zoxc:gnu-tls, r=pnkfelix
Browse files Browse the repository at this point in the history
Workaround rust-lang#109797 on windows-gnu

The addition of `#[inline]` here in rust-lang#108089 caused an unrelated linking issue (rust-lang#109797). This PR removes this attribute again on Windows to avoid regressions.
  • Loading branch information
matthiaskrgr committed Apr 6, 2023
2 parents de74dab + 6c94136 commit b7e6973
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/std/src/sys/common/thread_local/os_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ macro_rules! __thread_local_inner {
#[inline]
fn __init() -> $t { $init }

#[cfg_attr(not(bootstrap), inline)]
// `#[inline] does not work on windows-gnu due to linking errors around dllimports.
// See https://github.com/rust-lang/rust/issues/109797.
#[cfg_attr(not(windows), inline)]
unsafe fn __getit(
init: $crate::option::Option<&mut $crate::option::Option<$t>>,
) -> $crate::option::Option<&'static $t> {
Expand Down

0 comments on commit b7e6973

Please sign in to comment.