Update docs to match
Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
parent
ca9d50982d
commit
3ff7d3da54
2 changed files with 7 additions and 10 deletions
|
@ -129,18 +129,15 @@ development version of Miri using
|
||||||
./miri install
|
./miri install
|
||||||
```
|
```
|
||||||
|
|
||||||
and then you can use it as if it was installed by `rustup`. Make sure you use
|
and then you can use it as if it was installed by `rustup` as a component of the
|
||||||
the same toolchain when calling `cargo miri` that you used when installing Miri!
|
`miri` toolchain. Note that the `miri` and `cargo-miri` executables are placed
|
||||||
Usually this means you have to write `cargo +miri miri ...` to select the `miri`
|
in the `miri` toolchain's sysroot to prevent conflicts with other toolchains.
|
||||||
toolchain that was installed by `./miri toolchain`.
|
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
|
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
|
`./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.
|
`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
|
### Using a modified standard library
|
||||||
|
|
||||||
Miri re-builds the standard library into a custom sysroot, so it is fairly easy
|
Miri re-builds the standard library into a custom sysroot, so it is fairly easy
|
||||||
|
|
|
@ -6,8 +6,8 @@ USAGE=$(cat <<"EOF"
|
||||||
./miri install <flags>:
|
./miri install <flags>:
|
||||||
Installs the miri driver and cargo-miri. <flags> are passed to `cargo
|
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
|
install`. Sets up the rpath such that the installed binary should work in any
|
||||||
working directory. However, the rustup toolchain when invoking `cargo miri`
|
working directory. Note that the binaries are placed in the `miri` toolchain
|
||||||
needs to be the same one used for `./miri install`.
|
sysroot, to prevent conflicts with other toolchains.
|
||||||
|
|
||||||
./miri build <flags>:
|
./miri build <flags>:
|
||||||
Just build miri. <flags> are passed to `cargo build`.
|
Just build miri. <flags> are passed to `cargo build`.
|
||||||
|
@ -281,7 +281,7 @@ find_sysroot() {
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
install)
|
install)
|
||||||
# "--locked" to respect the Cargo.lock file if it exists.
|
# "--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" --force --locked --root "$SYSROOT" "$@"
|
||||||
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --root "$SYSROOT" "$@"
|
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --root "$SYSROOT" "$@"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue