Skip to content

Commit 24c5e49

Browse files
committed
std: Fix compiling the standard library on i686-MSVC
This commit fixes building the standard library with the `i686-pc-windows-msvc` target by correcting an included symbol name to the linker.
1 parent 7cb157e commit 24c5e49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/sys/windows/thread_local.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,12 @@ pub static p_thread_callback: unsafe extern "system" fn(LPVOID, DWORD,
231231
LPVOID) =
232232
on_tls_callback;
233233

234-
#[cfg(target_env = "msvc")]
234+
#[cfg(all(target_env = "msvc", target_pointer_width = "64"))]
235235
#[link_args = "/INCLUDE:_tls_used"]
236236
extern {}
237+
#[cfg(all(target_env = "msvc", target_pointer_width = "32"))]
238+
#[link_args = "/INCLUDE:__tls_used"]
239+
extern {}
237240

238241
#[allow(warnings)]
239242
unsafe extern "system" fn on_tls_callback(h: LPVOID,

0 commit comments

Comments
 (0)