Skip to content

Commit ce93029

Browse files
authored
Rollup merge of #109806 - Zoxc:gnu-tls, r=pnkfelix
Workaround #109797 on windows-gnu The addition of `#[inline]` here in rust-lang/rust#108089 caused an unrelated linking issue (rust-lang/rust#109797). This PR removes this attribute again on Windows to avoid regressions.
2 parents 7969f6e + c992476 commit ce93029

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

std/src/sys/common/thread_local/os_local.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ macro_rules! __thread_local_inner {
4949
#[inline]
5050
fn __init() -> $t { $init }
5151

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

0 commit comments

Comments
 (0)