about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-04-10 16:50:50 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-04-10 16:53:23 +0200
commit16f41266567b16924cd0dff66122db041cc613a5 (patch)
tree55921dcb0429c7c9e56540d0080af46e9411eaf1
parent3fb3043358c27a648430fc024111eba0651d0d5c (diff)
downloadrust-16f41266567b16924cd0dff66122db041cc613a5.tar.gz
rust-16f41266567b16924cd0dff66122db041cc613a5.zip
Pass --sysroot in config.sh to prevent passing it
-rwxr-xr-xbuild_sysroot/build_sysroot.sh2
-rw-r--r--config.sh2
-rwxr-xr-xtest.sh8
3 files changed, 6 insertions, 6 deletions
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"