Skip to content

Commit a37a1fc

Browse files
committed
---
yaml --- r: 219878 b: refs/heads/snap-stage3 c: ae0eb67 h: refs/heads/master v: v3
1 parent a5d23a2 commit a37a1fc

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: 91c22b63020e15908859b11bfe777d65bc55aa98
3+
refs/heads/snap-stage3: ae0eb675db97a57a63f941b29754d8e32040ecc9
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
#![cfg_attr(windows, feature(str_utf16))]
152152
#![cfg_attr(test, feature(float_from_str_radix, range_inclusive, float_extras))]
153153
#![cfg_attr(test, feature(test, rustc_private, float_consts))]
154+
#![cfg_attr(target_env = "msvc", feature(link_args))]
154155

155156
// Don't link to std. We are std.
156157
#![no_std]

branches/snap-stage3/src/libstd/sys/windows/thread_local.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ unsafe fn unregister_dtor(key: Key) -> bool {
221221
//
222222
// # The article mentions crazy stuff about "/INCLUDE"?
223223
//
224-
// It sure does! This seems to work for now, so maybe we'll just run into
225-
// that if we start linking with msvc?
224+
// It sure does! We include it below for MSVC targets, but it look like for GNU
225+
// targets we don't require it.
226226

227227
#[link_section = ".CRT$XLB"]
228228
#[linkage = "external"]
@@ -231,6 +231,10 @@ pub static p_thread_callback: unsafe extern "system" fn(LPVOID, DWORD,
231231
LPVOID) =
232232
on_tls_callback;
233233

234+
#[cfg(target_env = "msvc")]
235+
#[link_args = "/INCLUDE:_tls_used"]
236+
extern {}
237+
234238
#[allow(warnings)]
235239
unsafe extern "system" fn on_tls_callback(h: LPVOID,
236240
dwReason: DWORD,

0 commit comments

Comments
 (0)