diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh index 33da1e3dd67..5e1d0904753 100755 --- a/build_sysroot/build_sysroot.sh +++ b/build_sysroot/build_sysroot.sh @@ -20,7 +20,7 @@ fi # Build libs mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/ -export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked --sysroot sysroot" +export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked" if [[ "$1" == "--release" ]]; then channel='release' RUSTFLAGS="$RUSTFLAGS -Zmir-opt-level=3" cargo build --target $TARGET_TRIPLE --release diff --git a/config.sh b/config.sh index 87acb63f888..5dca77855d7 100644 --- a/config.sh +++ b/config.sh @@ -18,6 +18,6 @@ else cargo build fi -export RUSTFLAGS='-Zalways-encode-mir -Cpanic=abort -Cdebuginfo=2 -Zcodegen-backend='$(pwd)'/target/'$channel'/librustc_codegen_cranelift.'$dylib_ext +export RUSTFLAGS='-Zalways-encode-mir -Cpanic=abort -Cdebuginfo=2 -Zcodegen-backend='$(pwd)'/target/'$channel'/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$(pwd)'/build_sysroot/sysroot' RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out" export RUST_LOG=warn # display metadata load errors diff --git a/test.sh b/test.sh index 5653caee162..6be002a9c03 100755 --- a/test.sh +++ b/test.sh @@ -25,21 +25,21 @@ echo "[BUILD] sysroot" time ./build_sysroot/build_sysroot.sh echo "[BUILD+RUN] alloc_example" -$RUSTC --sysroot ./build_sysroot/sysroot example/alloc_example.rs --crate-type bin +$RUSTC example/alloc_example.rs --crate-type bin ./target/out/alloc_example echo "[BUILD+RUN] std_example" -$RUSTC --sysroot ./build_sysroot/sysroot example/std_example.rs --crate-type bin +$RUSTC example/std_example.rs --crate-type bin ./target/out/std_example echo "[BUILD] mod_bench" -$RUSTC --sysroot ./build_sysroot/sysroot example/mod_bench.rs --crate-type bin +$RUSTC example/mod_bench.rs --crate-type bin # FIXME linker gives multiple definitions error on Linux #echo "[BUILD] sysroot in release mode" #./build_sysroot/build_sysroot.sh --release -COMPILE_MOD_BENCH_INLINE="$RUSTC --sysroot ./build_sysroot/sysroot example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline" +COMPILE_MOD_BENCH_INLINE="$RUSTC example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline" COMPILE_MOD_BENCH_LLVM_0="rustc example/mod_bench.rs --crate-type bin -Copt-level=0 -o target/out/mod_bench_llvm_0 -Cpanic=abort" COMPILE_MOD_BENCH_LLVM_1="rustc example/mod_bench.rs --crate-type bin -Copt-level=1 -o target/out/mod_bench_llvm_1 -Cpanic=abort" COMPILE_MOD_BENCH_LLVM_2="rustc example/mod_bench.rs --crate-type bin -Copt-level=2 -o target/out/mod_bench_llvm_2 -Cpanic=abort"