From ca9fc101c00e33a0735a3bd2fa44eeeb7841422f Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 16 Aug 2020 21:20:12 +0200 Subject: Fix weak linkage This removes the last sysroot patch apart from the few patches that disable tests --- example/mini_core_hello_world.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'example') diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 9c2ab5a5165..d79f9f5f79c 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -241,19 +241,22 @@ fn main() { assert_eq!(((|()| 42u8) as fn(()) -> u8)(()), 42); - extern { - #[linkage = "extern_weak"] - static ABC: *const u8; - } - + #[cfg(not(jit))] { extern { #[linkage = "extern_weak"] static ABC: *const u8; } - } - unsafe { assert_eq!(ABC as usize, 0); } + { + extern { + #[linkage = "extern_weak"] + static ABC: *const u8; + } + } + + unsafe { assert_eq!(ABC as usize, 0); } + } &mut (|| Some(0 as *const ())) as &mut dyn FnMut() -> Option<*const ()>; -- cgit 1.4.1-3-g733a5