Skip to content

Commit

Permalink
Auto merge of rust-lang#117579 - RalfJung:miri, r=RalfJung
Browse files Browse the repository at this point in the history
Miri subtree update

r? `@ghost`
  • Loading branch information
bors committed Nov 4, 2023
2 parents f81d6f0 + 2ef639d commit 9c8a269
Show file tree
Hide file tree
Showing 99 changed files with 574 additions and 255 deletions.
5 changes: 3 additions & 2 deletions src/tools/miri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ degree documented below):
- All Rust [Tier 1 targets](https://doc.rust-lang.org/rustc/platform-support.html) are supported by
Miri. They are all checked on Miri's CI, and some (at least one per OS) are even checked on every
Rust PR, so the shipped Miri should always work on these targets.
- We also support `s390x-unknown-linux-gnu` as our "big-endian target of choice".
- `aarch64-apple-darwin` is supported.
- `s390x-unknown-linux-gnu` is supported as our "big-endian target of choice".
- For every other target with OS `linux`, `macos`, or `windows`, Miri should generally work, but we
make no promises.
make no promises and we don't run tests for such targets.
- For targets on other operating systems, even basic operations such as printing to the standard
output might not work, and Miri might fail before even reaching the `main` function.

Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2e4e2a8f288f642cafcc41fff211955ceddc453d
3aaa0f57b7b877ef58532a8de075d1e5a79142bf
18 changes: 13 additions & 5 deletions src/tools/miri/src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fn run_compiler(
mut args: Vec<String>,
target_crate: bool,
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
using_internal_features: std::sync::Arc<std::sync::atomic::AtomicBool>
using_internal_features: std::sync::Arc<std::sync::atomic::AtomicBool>,
) -> ! {
if target_crate {
// Miri needs a custom sysroot for target crates.
Expand Down Expand Up @@ -275,7 +275,8 @@ fn run_compiler(
// Invoke compiler, and handle return code.
let exit_code = rustc_driver::catch_with_exit_code(move || {
rustc_driver::RunCompiler::new(&args, callbacks)
.set_using_internal_features(using_internal_features).run()
.set_using_internal_features(using_internal_features)
.run()
});
std::process::exit(exit_code)
}
Expand All @@ -297,7 +298,8 @@ fn main() {
// If the environment asks us to actually be rustc, then do that.
if let Some(crate_kind) = env::var_os("MIRI_BE_RUSTC") {
// Earliest rustc setup.
let using_internal_features = rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
let using_internal_features =
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
rustc_driver::init_rustc_env_logger(&handler);

let target_crate = if crate_kind == "target" {
Expand All @@ -318,7 +320,8 @@ fn main() {
}

// Add an ICE bug report hook.
let using_internal_features = rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());
let using_internal_features =
rustc_driver::install_ice_hook("https://github.com/rust-lang/miri/issues/new", |_| ());

// Init loggers the Miri way.
init_early_loggers(&handler);
Expand Down Expand Up @@ -581,5 +584,10 @@ fn main() {

debug!("rustc arguments: {:?}", rustc_args);
debug!("crate arguments: {:?}", miri_config.args);
run_compiler(rustc_args, /* target_crate: */ true, &mut MiriCompilerCalls { miri_config }, using_internal_features)
run_compiler(
rustc_args,
/* target_crate: */ true,
&mut MiriCompilerCalls { miri_config },
using_internal_features,
)
}
Loading

0 comments on commit 9c8a269

Please sign in to comment.