File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 20
20
21
21
# Build libs
22
22
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE /lib/
23
- export RUSTFLAGS=" $RUSTFLAGS -Z force-unstable-if-unmarked --sysroot sysroot "
23
+ export RUSTFLAGS=" $RUSTFLAGS -Z force-unstable-if-unmarked"
24
24
if [[ " $1 " == " --release" ]]; then
25
25
channel=' release'
26
26
RUSTFLAGS=" $RUSTFLAGS -Zmir-opt-level=3" cargo build --target $TARGET_TRIPLE --release
Original file line number Diff line number Diff line change 18
18
cargo build
19
19
fi
20
20
21
- export RUSTFLAGS=' -Zalways-encode-mir -Cpanic=abort -Cdebuginfo=2 -Zcodegen-backend=' $( pwd) ' /target/' $channel ' /librustc_codegen_cranelift.' $dylib_ext
21
+ export RUSTFLAGS=' -Zalways-encode-mir -Cpanic=abort -Cdebuginfo=2 -Zcodegen-backend=' $( pwd) ' /target/' $channel ' /librustc_codegen_cranelift.' $dylib_ext ' --sysroot ' $( pwd ) ' /build_sysroot/sysroot '
22
22
RUSTC=" rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
23
23
export RUST_LOG=warn # display metadata load errors
Original file line number Diff line number Diff line change @@ -25,21 +25,21 @@ echo "[BUILD] sysroot"
25
25
time ./build_sysroot/build_sysroot.sh
26
26
27
27
echo " [BUILD+RUN] alloc_example"
28
- $RUSTC --sysroot ./build_sysroot/sysroot example/alloc_example.rs --crate-type bin
28
+ $RUSTC example/alloc_example.rs --crate-type bin
29
29
./target/out/alloc_example
30
30
31
31
echo " [BUILD+RUN] std_example"
32
- $RUSTC --sysroot ./build_sysroot/sysroot example/std_example.rs --crate-type bin
32
+ $RUSTC example/std_example.rs --crate-type bin
33
33
./target/out/std_example
34
34
35
35
echo " [BUILD] mod_bench"
36
- $RUSTC --sysroot ./build_sysroot/sysroot example/mod_bench.rs --crate-type bin
36
+ $RUSTC example/mod_bench.rs --crate-type bin
37
37
38
38
# FIXME linker gives multiple definitions error on Linux
39
39
# echo "[BUILD] sysroot in release mode"
40
40
# ./build_sysroot/build_sysroot.sh --release
41
41
42
- 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"
42
+ COMPILE_MOD_BENCH_INLINE=" $RUSTC example/mod_bench.rs --crate-type bin -Zmir-opt-level=3 -O --crate-name mod_bench_inline"
43
43
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"
44
44
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"
45
45
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"
You can’t perform that action at this time.
0 commit comments