Skip to content

Commit 35535e1

Browse files
committed
Auto merge of #2744 - RalfJung:json, r=RalfJung
support using a JSON target file Fixes #2053
2 parents 9d7317a + dabe287 commit 35535e1

File tree

8 files changed

+187
-137
lines changed

8 files changed

+187
-137
lines changed

Cargo.lock

+87-67
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-miri/Cargo.lock

+35-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-miri/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ directories = "4"
1818
rustc_version = "0.4"
1919
serde_json = "1.0.40"
2020
cargo_metadata = "0.15.0"
21-
rustc-build-sysroot = "0.4"
21+
rustc-build-sysroot = "0.4.1"
2222

2323
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
2424
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`

cargo-miri/src/setup.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,11 @@ pub fn setup(subcommand: &MiriCommand, target: &str, rustc_version: &VersionMeta
137137
.rustflags(rustflags)
138138
.cargo(cargo_cmd)
139139
.build_from_source(&rust_src)
140-
.unwrap_or_else(|_| {
141-
if only_setup {
142-
show_error!("failed to build sysroot, see error details above")
140+
.unwrap_or_else(|err| {
141+
if print_sysroot {
142+
show_error!("failed to build sysroot")
143+
} else if only_setup {
144+
show_error!("failed to build sysroot: {err:?}")
143145
} else {
144146
show_error!(
145147
"failed to build sysroot; run `cargo miri setup` to see the error details"

ci.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ case $HOST_TARGET in
108108
MIRI_TEST_TARGET=i686-pc-windows-msvc run_tests
109109
MIRI_TEST_TARGET=x86_64-unknown-freebsd run_tests_minimal hello integer vec panic/panic concurrency/simple atomic data_race env/var
110110
MIRI_TEST_TARGET=aarch64-linux-android run_tests_minimal hello integer vec panic/panic
111-
MIRI_TEST_TARGET=wasm32-wasi MIRI_NO_STD=1 run_tests_minimal no_std # supports std but miri doesn't support it
111+
MIRI_TEST_TARGET=wasm32-wasi run_tests_minimal no_std # supports std but page_size fails to build
112112
MIRI_TEST_TARGET=thumbv7em-none-eabihf MIRI_NO_STD=1 run_tests_minimal no_std # no_std embedded architecture
113+
MIRI_TEST_TARGET=tests/avr.json MIRI_NO_STD=1 run_tests_minimal no_std # JSON target file
113114
;;
114115
x86_64-apple-darwin)
115116
MIRI_TEST_TARGET=mips64-unknown-linux-gnuabi64 run_tests # big-endian architecture

test-cargo-miri/Cargo.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)