Skip to content

Commit

Permalink
Auto merge of #135947 - matthiaskrgr:rollup-k9jpfls, r=matthiaskrgr
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - #135073 (Implement `ByteStr` and `ByteString` types)
 - #135492 (Add missing check for async body when suggesting await on futures.)
 - #135766 (handle global trait bounds defining assoc types)
 - #135880 (Get rid of RunCompiler)
 - #135908 (rustc_codegen_llvm: remove outdated asm-to-obj codegen note)
 - #135911 (Allow `arena_cache` queries to return `Option<&'tcx T>`)
 - #135920 (simplify parse_format::Parser::ws by using next_if)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jan 24, 2025
2 parents 0d42c63 + bc8069a commit 758d784
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/bin/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use std::ops::Range;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::atomic::{AtomicI32, Ordering};
use std::sync::{Arc, Once};
use std::sync::Once;

use miri::{
BacktraceStyle, BorrowTrackerMethod, MiriConfig, MiriEntryFnType,ProvenanceMode, RetagFields, ValidationMode,
Expand Down Expand Up @@ -370,13 +370,10 @@ fn init_late_loggers(early_dcx: &EarlyDiagCtxt, tcx: TyCtxt<'_>) {
fn run_compiler_and_exit(
args: &[String],
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
using_internal_features: Arc<std::sync::atomic::AtomicBool>,
) -> ! {
// 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();
rustc_driver::run_compiler(args, callbacks);
Ok(())
});
std::process::exit(exit_code)
Expand Down Expand Up @@ -467,8 +464,7 @@ 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, |_| ());
rustc_driver::install_ice_hook(rustc_driver::DEFAULT_BUG_REPORT_URL, |_| ());
rustc_driver::init_rustc_env_logger(&early_dcx);

let target_crate = if crate_kind == "target" {
Expand All @@ -492,16 +488,11 @@ fn main() {
}

// We cannot use `rustc_driver::main` as we want it to use `args` as the CLI arguments.
run_compiler_and_exit(
&args,
&mut MiriBeRustCompilerCalls { target_crate },
using_internal_features,
)
run_compiler_and_exit(&args, &mut MiriBeRustCompilerCalls { target_crate })
}

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

// Init loggers the Miri way.
init_early_loggers(&early_dcx);
Expand Down Expand Up @@ -735,9 +726,5 @@ fn main() {

debug!("rustc arguments: {:?}", rustc_args);
debug!("crate arguments: {:?}", miri_config.args);
run_compiler_and_exit(
&rustc_args,
&mut MiriCompilerCalls::new(miri_config, many_seeds),
using_internal_features,
)
run_compiler_and_exit(&rustc_args, &mut MiriCompilerCalls::new(miri_config, many_seeds))
}

0 comments on commit 758d784

Please sign in to comment.