]> git.lizzy.rs Git - rust.git/blob - tests/run-make/thumb-none-qemu/script.sh
Rollup merge of #106618 - jmillikin:os-net-rustdoc-wasm32, r=JohnTitor
[rust.git] / tests / run-make / thumb-none-qemu / script.sh
1 #!/bin/sh
2 set -exuo pipefail
3
4 CRATE=example
5
6 env | sort
7 mkdir -p $WORK_DIR
8 pushd $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
20 popd