8
8
rustc:: untranslatable_diagnostic
9
9
) ]
10
10
11
+ // Some "regular" crates we want to share with rustc
12
+ #[ macro_use]
13
+ extern crate tracing;
14
+
15
+ // The rustc crates we need
11
16
extern crate rustc_data_structures;
12
17
extern crate rustc_driver;
13
18
extern crate rustc_hir;
@@ -16,8 +21,6 @@ extern crate rustc_log;
16
21
extern crate rustc_metadata;
17
22
extern crate rustc_middle;
18
23
extern crate rustc_session;
19
- #[ macro_use]
20
- extern crate tracing;
21
24
22
25
use std:: env:: { self , VarError } ;
23
26
use std:: num:: NonZero ;
@@ -202,16 +205,12 @@ fn rustc_logger_config() -> rustc_log::LoggerConfig {
202
205
// rustc traced, but you can also do `MIRI_LOG=miri=trace,rustc_const_eval::interpret=debug`.
203
206
if tracing:: Level :: from_str ( & var) . is_ok ( ) {
204
207
cfg. filter = Ok ( format ! (
205
- "rustc_middle::mir::interpret={var},rustc_const_eval::interpret={var}"
208
+ "rustc_middle::mir::interpret={var},rustc_const_eval::interpret={var},miri={var} "
206
209
) ) ;
207
210
} else {
208
211
cfg. filter = Ok ( var) ;
209
212
}
210
213
}
211
- // Enable verbose entry/exit logging by default if MIRI_LOG is set.
212
- if matches ! ( cfg. verbose_entry_exit, Err ( VarError :: NotPresent ) ) {
213
- cfg. verbose_entry_exit = Ok ( format ! ( "1" ) ) ;
214
- }
215
214
}
216
215
217
216
cfg
@@ -342,7 +341,8 @@ fn main() {
342
341
// (`install_ice_hook` might change `RUST_BACKTRACE`.)
343
342
let env_snapshot = env:: vars_os ( ) . collect :: < Vec < _ > > ( ) ;
344
343
345
- let args = rustc_driver:: args:: raw_args ( & early_dcx) . unwrap_or_else ( |_| std:: process:: exit ( rustc_driver:: EXIT_FAILURE ) ) ;
344
+ let args = rustc_driver:: args:: raw_args ( & early_dcx)
345
+ . unwrap_or_else ( |_| std:: process:: exit ( rustc_driver:: EXIT_FAILURE ) ) ;
346
346
347
347
// If the environment asks us to actually be rustc, then do that.
348
348
if let Some ( crate_kind) = env:: var_os ( "MIRI_BE_RUSTC" ) {
@@ -408,17 +408,11 @@ fn main() {
408
408
miri_config. check_alignment = miri:: AlignmentCheck :: None ;
409
409
} else if arg == "-Zmiri-symbolic-alignment-check" {
410
410
miri_config. check_alignment = miri:: AlignmentCheck :: Symbolic ;
411
- } else if arg == "-Zmiri-check-number-validity" {
412
- eprintln ! (
413
- "WARNING: the flag `-Zmiri-check-number-validity` no longer has any effect \
414
- since it is now enabled by default"
415
- ) ;
416
411
} else if arg == "-Zmiri-disable-abi-check" {
417
412
eprintln ! (
418
- "WARNING: the flag `-Zmiri-disable-abi-check` is deprecated and planned to be removed. \n \
419
- If you have a use-case for it, please file an issue. "
413
+ "WARNING: the flag `-Zmiri-disable-abi-check` no longer has any effect; \
414
+ ABI checks cannot be disabled any more "
420
415
) ;
421
- miri_config. check_abi = false ;
422
416
} else if arg == "-Zmiri-disable-isolation" {
423
417
if matches ! ( isolation_enabled, Some ( true ) ) {
424
418
show_error ! (
@@ -459,8 +453,6 @@ fn main() {
459
453
miri_config. collect_leak_backtraces = false ;
460
454
} else if arg == "-Zmiri-panic-on-unsupported" {
461
455
miri_config. panic_on_unsupported = true ;
462
- } else if arg == "-Zmiri-tag-raw-pointers" {
463
- eprintln ! ( "WARNING: `-Zmiri-tag-raw-pointers` has no effect; it is enabled by default" ) ;
464
456
} else if arg == "-Zmiri-strict-provenance" {
465
457
miri_config. provenance_mode = ProvenanceMode :: Strict ;
466
458
} else if arg == "-Zmiri-permissive-provenance" {
@@ -476,10 +468,6 @@ fn main() {
476
468
"scalar" => RetagFields :: OnlyScalar ,
477
469
_ => show_error ! ( "`-Zmiri-retag-fields` can only be `all`, `none`, or `scalar`" ) ,
478
470
} ;
479
- } else if arg == "-Zmiri-track-raw-pointers" {
480
- eprintln ! (
481
- "WARNING: `-Zmiri-track-raw-pointers` has no effect; it is enabled by default"
482
- ) ;
483
471
} else if let Some ( param) = arg. strip_prefix ( "-Zmiri-seed=" ) {
484
472
if miri_config. seed . is_some ( ) {
485
473
show_error ! ( "Cannot specify -Zmiri-seed multiple times!" ) ;
0 commit comments