File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -819,13 +819,17 @@ fn phase_cargo_rustdoc(fst_arg: &str, mut args: env::Args) {
819819 // This is fine for now, because cargo will never pass an --extern argument in the first position,
820820 // but we should defensively assert that this will work.
821821 let extern_flag = "--extern" ;
822+ let runtool_flag = "--runtool" ;
822823 assert ! ( fst_arg != extern_flag) ;
823824 cmd. arg ( fst_arg) ;
824825
825- // Patch --extern arguments to use *.rmeta files, since phase_cargo_rustc only creates stub *.rlib files.
826826 while let Some ( arg) = args. next ( ) {
827827 if arg == extern_flag {
828+ // Patch --extern arguments to use *.rmeta files, since phase_cargo_rustc only creates stub *.rlib files.
828829 try_forward_patched_extern_arg ( & mut args, & mut cmd) ;
830+ } else if arg == runtool_flag {
831+ // Do not forward an existing --runtool argument, since we will set this ourselves
832+ let _ = args. next ( ) . expect ( "`--runtool` should be followed by an executable name" ) ;
829833 } else {
830834 cmd. arg ( arg) ;
831835 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def cargo_miri(cmd):
1919 args = ["cargo" , "miri" , cmd , "-q" ]
2020 if 'MIRI_TEST_TARGET' in os .environ :
2121 args += ["--target" , os .environ ['MIRI_TEST_TARGET' ]]
22+ args += ["-Zdoctest-xcompile" ]
2223 return args
2324
2425def normalize_stdout (str ):
You can’t perform that action at this time.
0 commit comments