Misc build changes

This commit is contained in:
bjorn3 2018-12-28 17:15:13 +01:00
parent 8561349ece
commit b105534f97
2 changed files with 4 additions and 3 deletions

View File

@ -19,7 +19,8 @@ else
fi
# Build libs
export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked --sysroot ../"
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked --sysroot sysroot"
if [[ "$1" == "--release" ]]; then
channel='release'
RUSTFLAGS="$RUSTFLAGS -Zmir-opt-level=3" cargo build --target $TARGET_TRIPLE --release
@ -29,5 +30,4 @@ else
fi
# Copy files to sysroot
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
cp target/$TARGET_TRIPLE/$channel/deps/*.rlib sysroot/lib/rustlib/$TARGET_TRIPLE/lib/

View File

@ -19,7 +19,8 @@ echo "[JIT] mini_core_hello_world"
SHOULD_RUN=1 $RUSTC --crate-type bin example/mini_core_hello_world.rs --cfg jit
echo "[AOT] mini_core_hello_world"
build_example_bin mini_core_hello_world example/mini_core_hello_world.rs
$RUSTC example/mini_core_hello_world.rs --crate-name mini_core_hello_world --crate-type bin
sh -c ./target/out/mini_core_hello_world || true
echo "[BUILD] sysroot"
time ./build_sysroot/build_sysroot.sh