Compile sysroot in release mode by default

Fixes #938
This commit is contained in:
bjorn3 2020-06-13 19:19:38 +02:00
parent eb5ce4e92a
commit 9510791fce
3 changed files with 3 additions and 6 deletions

View file

@ -21,3 +21,4 @@ rustc-std-workspace-std = { path = "./sysroot_src/src/tools/rustc-std-workspace-
[profile.release]
debug = true
incremental = true

View file

@ -18,7 +18,7 @@ rm -r sysroot/ 2>/dev/null || true
export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked"
if [[ "$1" == "--release" ]]; then
sysroot_channel='release'
RUSTFLAGS="$RUSTFLAGS -Zmir-opt-level=3" cargo build --target $TARGET_TRIPLE --release
RUSTFLAGS="$RUSTFLAGS -Zmir-opt-level=2" cargo build --target $TARGET_TRIPLE --release
else
sysroot_channel='debug'
cargo build --target $TARGET_TRIPLE

View file

@ -38,7 +38,7 @@ $RUSTC example/arbitrary_self_types_pointers_and_wrappers.rs --crate-name arbitr
$RUN_WRAPPER ./target/out/arbitrary_self_types_pointers_and_wrappers
echo "[BUILD] sysroot"
time ./build_sysroot/build_sysroot.sh
time ./build_sysroot/build_sysroot.sh --release
echo "[AOT] alloc_example"
$RUSTC example/alloc_example.rs --crate-type bin --target $TARGET_TRIPLE
@ -71,10 +71,6 @@ $RUN_WRAPPER ./target/out/track-caller-attribute
echo "[BUILD] mod_bench"
$RUSTC example/mod_bench.rs --crate-type bin --target $TARGET_TRIPLE
# FIXME linker gives multiple definitions error on Linux
#echo "[BUILD] sysroot in release mode"
#./build_sysroot/build_sysroot.sh --release
pushd simple-raytracer
if [[ "$HOST_TRIPLE" = "$TARGET_TRIPLE" ]]; then
echo "[BENCH COMPILE] ebobby/simple-raytracer"