From 1122f42e2872a4bb65adeb990fb73cc555f5c3cf Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 25 May 2020 21:43:22 +0200 Subject: Support cross-compiling to Windows using MinGW --- example/mini_core.rs | 1 + example/mini_core_hello_world.rs | 4 ++-- example/std_example.rs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'example') diff --git a/example/mini_core.rs b/example/mini_core.rs index 7c6d7fc106d..c4834c80408 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -621,6 +621,7 @@ struct PanicLocation { } #[no_mangle] +#[cfg(not(windows))] pub fn get_tls() -> u8 { #[thread_local] static A: u8 = 42; diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 237f4d11d57..08ceaeb6544 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -239,7 +239,7 @@ fn main() { assert_eq!(((|()| 42u8) as fn(()) -> u8)(()), 42); - #[cfg(not(jit))] + #[cfg(not(any(jit, windows)))] { extern { #[linkage = "extern_weak"] @@ -292,7 +292,7 @@ fn main() { from_decimal_string(); - #[cfg(not(jit))] + #[cfg(not(any(jit, windows)))] test_tls(); #[cfg(all(not(jit), target_os = "linux"))] diff --git a/example/std_example.rs b/example/std_example.rs index 015bbdfed46..221b512e3bd 100644 --- a/example/std_example.rs +++ b/example/std_example.rs @@ -16,7 +16,8 @@ fn main() { let mut stderr = stderr.lock(); // FIXME support lazy jit when multi threading - #[cfg(not(lazy_jit))] + // FIXME support TLS on windows + #[cfg(not(any(lazy_jit, windows)))] std::thread::spawn(move || { println!("Hello from another thread!"); }); -- cgit 1.4.1-3-g733a5