Pass --sysroot in config.sh to prevent passing it
This commit is contained in:
parent
3fb3043358
commit
16f4126656
3 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
8
test.sh
8
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue