rust/tests/ui/thread-local/auxiliary/tls-rlib.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
293 B
Rust
Raw Normal View History

// no-prefer-dynamic
#![crate_type = "rlib"]
#![feature(thread_local)]
#![feature(cfg_target_thread_local)]
#[cfg(target_thread_local)]
#[thread_local]
pub static BAR: bool = true;
#[cfg(target_thread_local)]
#[inline(never)]
pub fn bar_addr() -> usize {
&BAR as *const bool as usize
}