Skip to content

Commit 32cc97e

Browse files
committed
move init to arg parsing
1 parent d0649ec commit 32cc97e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/bin/miri.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,6 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
192192
todo!("GenMC mode not yet implemented");
193193
};
194194

195-
#[cfg(target_os = "linux")]
196-
if !config.native_lib.is_empty() && !config.force_old_native_lib {
197-
// FIXME: This should display a diagnostic / warning on error
198-
// SAFETY: No other threads have spawned yet
199-
let _ = unsafe { miri::init_sv() };
200-
}
201-
202195
if let Some(many_seeds) = self.many_seeds.take() {
203196
assert!(config.seed.is_none());
204197
let exit_code = sync::IntoDynSyncSend(AtomicI32::new(rustc_driver::EXIT_SUCCESS));
@@ -802,6 +795,14 @@ fn main() {
802795

803796
debug!("rustc arguments: {:?}", rustc_args);
804797
debug!("crate arguments: {:?}", miri_config.args);
798+
799+
#[cfg(target_os = "linux")]
800+
if !miri_config.native_lib.is_empty() && !miri_config.force_old_native_lib {
801+
// FIXME: This should display a diagnostic / warning on error
802+
// SAFETY: No other threads have spawned yet
803+
let _ = unsafe { miri::init_sv() };
804+
}
805+
805806
run_compiler_and_exit(
806807
&rustc_args,
807808
&mut MiriCompilerCalls::new(miri_config, many_seeds, genmc_config),

0 commit comments

Comments
 (0)