diff --git a/src/lib.rs b/src/lib.rs index 7b0e4d231d6d..370a022a92bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -426,7 +426,7 @@ fn codegen_mono_items<'a, 'tcx: 'a>( (RLinkage::Internal, Visibility::Default) => Linkage::Local, // FIXME this should get external linkage, but hidden visibility, // not internal linkage and default visibility - | (RLinkage::External, Visibility::Hidden) => Linkage::Local, + | (RLinkage::External, Visibility::Hidden) => Linkage::Export, _ => panic!("{:?} = {:?} {:?}", mono_item, linkage, vis), }; base::trans_mono_item(&mut cx, mono_item, linkage); diff --git a/test.sh b/test.sh index 1782df6113dd..006f488790e3 100755 --- a/test.sh +++ b/test.sh @@ -25,10 +25,9 @@ sh -c ./target/out/mini_core_hello_world || true echo "[BUILD] sysroot" time ./build_sysroot/build_sysroot.sh -# TODO linux linker doesn't accept duplicate definitions -# echo "[BUILD+RUN] alloc_example" -#$RUSTC --sysroot ./build_sysroot/sysroot example/alloc_example.rs --crate-type bin -#./target/out/alloc_example +echo "[BUILD+RUN] alloc_example" +$RUSTC --sysroot ./build_sysroot/sysroot example/alloc_example.rs --crate-type bin -g +./target/out/alloc_example echo "[BUILD] mod_bench" $RUSTC --sysroot ./build_sysroot/sysroot example/mod_bench.rs --crate-type bin -g