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 @@ -69,6 +69,9 @@ pub struct Compilation<'cfg> {
69
69
/// Flags to pass to rustdoc when invoked from cargo test, per package.
70
70
pub rustdocflags : HashMap < PackageId , Vec < String > > ,
71
71
72
+ pub host : String ,
73
+ pub target : String ,
74
+
72
75
config : & ' cfg Config ,
73
76
74
77
/// Rustc process to be used by default
@@ -126,6 +129,8 @@ impl<'cfg> Compilation<'cfg> {
126
129
rustc_process : rustc,
127
130
rustc_workspace_wrapper_process,
128
131
primary_rustc_process,
132
+ host : bcx. host_triple ( ) . to_string ( ) ,
133
+ target : bcx. target_data . short_name ( & default_kind) . to_string ( ) ,
129
134
target_runner : target_runner ( bcx, default_kind) ?,
130
135
} )
131
136
}
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ fn run_doc_tests(
144
144
let mut runtool: & Option < ( std:: path:: PathBuf , Vec < String > ) > = & None ;
145
145
if doctest_xcompile {
146
146
runtool = compilation. target_runner ( ) ;
147
- } else if options . compile_opts . build_config . requested_kind . is_host ( ) {
147
+ } else if compilation . host != compilation . target {
148
148
return Ok ( ( Test :: Doc , errors) ) ;
149
149
}
150
150
You can’t perform that action at this time.
0 commit comments