Skip to content

Commit b7e6973

Browse files
authored
Rollup merge of rust-lang#109806 - Zoxc:gnu-tls, r=pnkfelix
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.
2 parents de74dab + 6c94136 commit b7e6973

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: library/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)