1#!/bin/sh 2set -exuo pipefail 3 4CRATE=example 5 6env | sort 7mkdir -p $WORK_DIR 8pushd $WORK_DIR 9 rm -rf $CRATE || echo OK 10 cp -a $HERE/example . 11 pushd $CRATE 12 # HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features. 13 # These come from the top-level Rust workspace, that this crate is not a 14 # member of, but Cargo tries to load the workspace `Cargo.toml` anyway. 15 env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \ 16 $BOOTSTRAP_CARGO run --target $TARGET | grep "x = 42" 17 env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \ 18 $BOOTSTRAP_CARGO run --target $TARGET --release | grep "x = 42" 19 popd 20popd 21