Fix alloc_example

This commit is contained in:
bjorn3 2019-02-11 15:28:56 +01:00
parent 19f9810a0f
commit a272efa030
2 changed files with 4 additions and 5 deletions

View File

@ -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);

View File

@ -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