mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Remove _tls_used trickery unless needed
This commit is contained in:
parent
2fc091f510
commit
ad4c4f4654
@ -295,16 +295,13 @@ unsafe extern "system" fn on_tls_callback(_h: c::LPVOID, dwReason: c::DWORD, _pv
|
|||||||
|
|
||||||
// See comments above for what this is doing. Note that we don't need this
|
// See comments above for what this is doing. Note that we don't need this
|
||||||
// trickery on GNU windows, just on MSVC.
|
// trickery on GNU windows, just on MSVC.
|
||||||
reference_tls_used();
|
#[cfg(all(target_env = "msvc", not(target_thread_local)))]
|
||||||
#[cfg(target_env = "msvc")]
|
{
|
||||||
unsafe fn reference_tls_used() {
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static _tls_used: u8;
|
static _tls_used: u8;
|
||||||
}
|
}
|
||||||
crate::intrinsics::volatile_load(&_tls_used);
|
crate::intrinsics::volatile_load(&_tls_used);
|
||||||
}
|
}
|
||||||
#[cfg(not(target_env = "msvc"))]
|
|
||||||
unsafe fn reference_tls_used() {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_thread_local))]
|
#[cfg(not(target_thread_local))]
|
||||||
|
Loading…
Reference in New Issue
Block a user