2023-02-03 01:05:59 -06:00
|
|
|
#![crate_type = "dylib"]
|
|
|
|
#![feature(thread_local)]
|
|
|
|
#![feature(cfg_target_thread_local)]
|
|
|
|
|
|
|
|
extern crate tls_rlib;
|
|
|
|
|
|
|
|
pub use tls_rlib::*;
|
|
|
|
|
2023-03-29 07:50:10 -05:00
|
|
|
#[cfg(target_thread_local)]
|
2023-02-03 01:05:59 -06:00
|
|
|
#[thread_local]
|
|
|
|
pub static FOO: bool = true;
|
|
|
|
|
2023-03-29 07:50:10 -05:00
|
|
|
#[cfg(target_thread_local)]
|
2023-02-03 01:05:59 -06:00
|
|
|
#[inline(never)]
|
|
|
|
pub fn foo_addr() -> usize {
|
|
|
|
&FOO as *const bool as usize
|
|
|
|
}
|