2020-11-03 07:55:49 -06:00
|
|
|
#!/bin/sh
|
2018-10-09 20:50:25 -05:00
|
|
|
set -exuo pipefail
|
|
|
|
|
2018-10-16 06:56:02 -05:00
|
|
|
CRATE=example
|
2018-10-09 20:50:25 -05:00
|
|
|
|
|
|
|
env | sort
|
|
|
|
mkdir -p $WORK_DIR
|
|
|
|
pushd $WORK_DIR
|
|
|
|
rm -rf $CRATE || echo OK
|
2018-10-16 06:56:02 -05:00
|
|
|
cp -a $HERE/example .
|
2018-10-09 20:50:25 -05:00
|
|
|
pushd $CRATE
|
2018-11-24 01:31:01 -06:00
|
|
|
# HACK(eddyb) sets `RUSTC_BOOTSTRAP=1` so Cargo can accept nightly features.
|
|
|
|
# These come from the top-level Rust workspace, that this crate is not a
|
|
|
|
# member of, but Cargo tries to load the workspace `Cargo.toml` anyway.
|
|
|
|
env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \
|
2020-09-10 09:17:32 -05:00
|
|
|
$BOOTSTRAP_CARGO run --target $TARGET | grep "x = 42"
|
2018-11-24 01:31:01 -06:00
|
|
|
env RUSTC_BOOTSTRAP=1 RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" \
|
2020-09-10 09:17:32 -05:00
|
|
|
$BOOTSTRAP_CARGO run --target $TARGET --release | grep "x = 42"
|
2018-10-09 20:50:25 -05:00
|
|
|
popd
|
2018-10-16 06:56:02 -05:00
|
|
|
popd
|