Skip to content

Commit 4ef60a2

Browse files
committed
Run thread-local-extern-static test only on supported platforms.
1 parent c2c58a3 commit 4ef60a2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/auxiliary/thread-local-extern-static.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
// except according to those terms.
1010

1111
#![feature(thread_local)]
12+
#![feature(cfg_target_thread_local)]
1213
#![crate_type = "lib"]
1314

1415
#[no_mangle]
15-
#[thread_local]
16+
#[cfg_attr(target_thread_local, thread_local)]
1617
pub static FOO: u32 = 3;

src/test/run-pass/thread-local-extern-static.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
// aux-build:thread-local-extern-static.rs
1212

1313
#![feature(thread_local)]
14+
#![feature(cfg_target_thread_local)]
1415

1516
extern crate thread_local_extern_static;
1617

1718
extern {
18-
#[thread_local]
19+
#[cfg_attr(target_thread_local, thread_local)]
1920
static FOO: u32;
2021
}
2122

0 commit comments

Comments
 (0)