about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2023-03-13 17:49:20 -0400
committerBen Kimock <kimockb@gmail.com>2023-03-14 19:22:17 -0400
commit3ff7d3da54a45e8709fa056d07cb538e1297731a (patch)
tree1920e40a0f74a1525c5dfe97918267c0e5224d53 /src
parentca9d50982d4b2fd5abe09066afdadd57c674ff57 (diff)
downloadrust-3ff7d3da54a45e8709fa056d07cb538e1297731a.tar.gz
rust-3ff7d3da54a45e8709fa056d07cb538e1297731a.zip
Update docs to match
Co-authored-by: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/CONTRIBUTING.md11
-rwxr-xr-xsrc/tools/miri/miri6
2 files changed, 7 insertions, 10 deletions
diff --git a/src/tools/miri/CONTRIBUTING.md b/src/tools/miri/CONTRIBUTING.md
index 476075e9c91..bcdb623b090 100644
--- a/src/tools/miri/CONTRIBUTING.md
+++ b/src/tools/miri/CONTRIBUTING.md
@@ -129,18 +129,15 @@ development version of Miri using
 ./miri install
 ```
 
-and then you can use it as if it was installed by `rustup`.  Make sure you use
-the same toolchain when calling `cargo miri` that you used when installing Miri!
-Usually this means you have to write `cargo +miri miri ...` to select the `miri`
-toolchain that was installed by `./miri toolchain`.
+and then you can use it as if it was installed by `rustup` as a component of the
+`miri` toolchain. Note that the `miri` and `cargo-miri` executables are placed
+in the `miri` toolchain's sysroot to prevent conflicts with other toolchains.
+The Miri binaries in the `cargo` bin directory (usually `~/.cargo/bin`) are managed by rustup.
 
 There's a test for the cargo wrapper in the `test-cargo-miri` directory; run
 `./run-test.py` in there to execute it. Like `./miri test`, this respects the
 `MIRI_TEST_TARGET` environment variable to execute the test for another target.
 
-Note that installing Miri like this will "take away" Miri management from `rustup`.
-If you want to later go back to a rustup-installed Miri, run `rustup update`.
-
 ### Using a modified standard library
 
 Miri re-builds the standard library into a custom sysroot, so it is fairly easy
diff --git a/src/tools/miri/miri b/src/tools/miri/miri
index 998e0d29524..1073ff499ba 100755
--- a/src/tools/miri/miri
+++ b/src/tools/miri/miri
@@ -6,8 +6,8 @@ USAGE=$(cat <<"EOF"
 ./miri install <flags>:
 Installs the miri driver and cargo-miri. <flags> are passed to `cargo
 install`. Sets up the rpath such that the installed binary should work in any
-working directory. However, the rustup toolchain when invoking `cargo miri`
-needs to be the same one used for `./miri install`.
+working directory. Note that the binaries are placed in the `miri` toolchain
+sysroot, to prevent conflicts with other toolchains.
 
 ./miri build <flags>:
 Just build miri. <flags> are passed to `cargo build`.
@@ -281,7 +281,7 @@ find_sysroot() {
 case "$COMMAND" in
 install)
     # "--locked" to respect the Cargo.lock file if it exists.
-    # Install binaries to the miri toolchain's sysroot so they do not interact with other toolchains
+    # Install binaries to the miri toolchain's sysroot so they do not interact with other toolchains.
     $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked --root "$SYSROOT" "$@"
     $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --root "$SYSROOT" "$@"
     ;;