Update to cranelift's formatting and testing scripts.

This commit is contained in:
Dan Gohman
2018-07-20 15:17:56 -07:00
parent c612d48b33
commit a2f70a3544
8 changed files with 139 additions and 20 deletions

View File

@@ -1,17 +1,12 @@
#!/bin/bash
set -euo pipefail
# Format all sources using rustfmt.
# Exit immediately on errors.
set -e
cd $(dirname "$0")
src=$(pwd)
topdir=$(dirname "$0")
cd "$topdir"
# Make sure we can find rustfmt.
export PATH="$PATH:$HOME/.cargo/bin"
for crate in $(find "$src" -name Cargo.toml); do
cd $(dirname "$crate")
cargo fmt -- "$@"
done
exec cargo +stable fmt --all -- "$@"