X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=CONTRIBUTING.md;h=9edd63dae31571b929b56a4f4d8410bae0614c70;hb=0e3038571cb1dd5c50aca28e4fe4c325ad5b2e98;hp=08dcd541f7bfbd2e97aff5cd80390b15a24d33bb;hpb=85a9a43bef0d69eb63c62f9d0d8304f6f226e7e3;p=rust.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08dcd541f7b..9edd63dae31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,7 +74,7 @@ You can get a trace of which MIR statements are being executed by setting the `MIRI_LOG` environment variable. For example: ```sh -MIRI_LOG=info ./miri run tests/run-pass/vecs.rs +MIRI_LOG=info ./miri run tests/run-pass/vec.rs ``` Setting `MIRI_LOG` like this will configure logging for Miri itself as well as @@ -83,7 +83,7 @@ can also do more targeted configuration, e.g. the following helps debug the stacked borrows implementation: ```sh -MIRI_LOG=rustc_mir::interpret=info,miri::stacked_borrows ./miri run tests/run-pass/vecs.rs +MIRI_LOG=rustc_mir::interpret=info,miri::stacked_borrows ./miri run tests/run-pass/vec.rs ``` In addition, you can set `MIRI_BACKTRACE=1` to get a backtrace of where an @@ -144,8 +144,9 @@ The setup for a local rustc works as follows: # Clone the rust-lang/rust repo. git clone https://github.com/rust-lang/rust rustc cd rustc -cp config.toml.example config.toml -# Now edit `config.toml` and set `debug-assertions = true`. +# Create a config.toml with defaults for working on miri. +./x.py setup compiler + # Now edit `config.toml` and under `[rust]` set `debug-assertions = true`. # Build a stage 1 rustc, and build the rustc libraries with that rustc. # This step can take 30 minutes or more. @@ -158,5 +159,8 @@ rustup toolchain link stage1 build/x86_64-unknown-linux-gnu/stage1 rustup override set stage1 ``` +For more information about building and configuring a local compiler, +see . + With this, you should now have a working development setup! See [above](#building-and-testing-miri) for how to proceed working on Miri.