blob: 42bbfc46154c62968551983b926402a82c5894c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//@ 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
}
|