diff --git a/.appveyor.yml b/.appveyor.yml index c3d575403c..1e1cb52584 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,8 +27,8 @@ install: - rustup uninstall beta - rustup update # Install "master" toolchain - - cargo install rustup-toolchain-install-master & exit 0 - - rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c cargo -c rust-src + - cargo install rustup-toolchain-install-master -f + - rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c rust-src -c rustc-dev - rustup default master - rustc --version - cargo --version diff --git a/.travis.yml b/.travis.yml index 446fab7941..c2fe32423c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,8 @@ before_script: - rustup uninstall beta - rustup update # Install "master" toolchain -- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed" -- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src +- cargo install rustup-toolchain-install-master -f +- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev - rustup default master - rustc --version - cargo --version diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83e2338552..d643687393 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,8 +31,10 @@ Miri heavily relies on internal rustc interfaces to execute MIR. Still, some things (like adding support for a new intrinsic or a shim for an external function being called) can be done by working just on the Miri side. -To prepare, make sure you are using a nightly Rust compiler. Then you should be -able to just `cargo build` Miri. +To prepare, make sure you are using a nightly Rust compiler. You also need to +have the `rust-src` and `rustc-dev` components installed, which you can add via +`rustup component add rust-src rustc-dev`. Then you should be able to just +`cargo build` Miri. In case this fails, your nightly might be incompatible with Miri master. The `rust-version` file contains the commit hash of rustc that Miri is currently @@ -41,7 +43,7 @@ to wait for the next nightly to get released. You can also use [`rustup-toolchain-install-master`](https://github.com/kennytm/rustup-toolchain-install-master) to install that exact version of rustc as a toolchain: ``` -rustup-toolchain-install-master $(cat rust-version) -c rust-src +rustup-toolchain-install-master $(cat rust-version) -c rust-src -c rustc-dev ``` Another common problem is outdated dependencies: Miri does not come with a diff --git a/rust-version b/rust-version index db6f5ebe88..43ebb88d16 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -2748a9fd93dd1a00a4521f4f16de5befbf77f6cd +000d90b11f7be70ffb7812680f7abc6deb52ec88 diff --git a/src/bin/cargo-miri.rs b/src/bin/cargo-miri.rs index 43e8761d48..ebff26f647 100644 --- a/src/bin/cargo-miri.rs +++ b/src/bin/cargo-miri.rs @@ -137,7 +137,11 @@ fn test_sysroot_consistency() { let stdout = String::from_utf8(out.stdout).expect("stdout is not valid UTF-8"); let stderr = String::from_utf8(out.stderr).expect("stderr is not valid UTF-8"); let stdout = stdout.trim(); - assert!(out.status.success(), "Bad status code when getting sysroot info.\nstdout:\n{}\nstderr:\n{}", stdout, stderr); + assert!( + out.status.success(), + "Bad status code when getting sysroot info via {:?}.\nstdout:\n{}\nstderr:\n{}", + cmd, stdout, stderr, + ); PathBuf::from(stdout).canonicalize() .unwrap_or_else(|_| panic!("Failed to canonicalize sysroot: {}", stdout)) }