Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ./x.py run miri #76666

Closed
RalfJung opened this issue Sep 13, 2020 · 4 comments · Fixed by #104046
Closed

Support ./x.py run miri #76666

RalfJung opened this issue Sep 13, 2020 · 4 comments · Fixed by #104046
Labels
A-miri Area: The miri tool C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

It would be great to have a way to run the in-tree Miri on a given file (similar to ./miri run in the Miri repo). That should even work with the stage 0 Miri, given that Miri's test suite also passes for stage 0.

However, I am not sure what the best x.py interface for this would look like, and how to integrate it. Cc @Mark-Simulacrum

@Mark-Simulacrum Mark-Simulacrum added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 13, 2020
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Sep 13, 2020

Can you point me to documentation or explain what exactly is being asked for here, in particular, I presume cargo miri run and cargo miri test are what we want to do, but I am not sure what those two commands do under the hood. Should I just read https://github.com/rust-lang/miri/blob/master/cargo-miri/bin.rs?

@jyn514 jyn514 added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Sep 13, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 13, 2020

./x.py run rustdoc f.rs would also be nice as an alias for x.py build src/tools/rustdoc library/std && rustdoc +stage1 f.rs.

@RalfJung
Copy link
Member Author

@Mark-Simulacrum basically, it should do the equivalent of this. Up until here, it's basically the same as what happens for testing, but then the final step "Run cargo test" needs to be replaced by running the Miri driver binary instead. I'm happy to help with that part.

@camelid
Copy link
Member

camelid commented Apr 13, 2021

It would be nice if we had this for rustdoc, which would let people get around the issue described here. Something like ./x.py run rustdoc.

notriddle added a commit to notriddle/rust that referenced this issue Nov 10, 2022
bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes rust-lang#76666
Manishearth added a commit to Manishearth/rust that referenced this issue Nov 10, 2022
bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes rust-lang#76666
@bors bors closed this as completed in 7124590 Nov 10, 2022
RalfJung pushed a commit to RalfJung/miri that referenced this issue Nov 15, 2022
bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes rust-lang/rust#76666
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 20, 2024
bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes rust-lang/rust#76666
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this issue Apr 27, 2024
bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

Fixes rust-lang/rust#76666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-miri Area: The miri tool C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants