File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/cargo/core/compiler/build_context Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -837,19 +837,17 @@ impl<'cfg> RustcTargetData<'cfg> {
837
837
} else {
838
838
config. host_cfg_triple ( & rustc. host ) ?
839
839
} ;
840
+ let is_cross = !requested_kinds. iter ( ) . any ( CompileKind :: is_host) ;
840
841
841
842
// This is a hack. The unit_dependency graph builder "pretends" that
842
843
// `CompileKind::Host` is `CompileKind::Target(host)` if the
843
844
// `--target` flag is not specified. Since the unit_dependency code
844
845
// needs access to the target config data, create a copy so that it
845
846
// can be found. See `rebuild_unit_graph_shared` for why this is done.
846
- let is_cross = if requested_kinds . iter ( ) . any ( CompileKind :: is_host ) {
847
+ if !is_cross {
847
848
let ct = CompileTarget :: new ( & rustc. host ) ?;
848
849
target_info. insert ( ct, host_info. clone ( ) ) ;
849
850
target_config. insert ( ct, config. target_cfg_triple ( & rustc. host ) ?) ;
850
- false
851
- } else {
852
- true
853
851
} ;
854
852
855
853
let mut res = RustcTargetData {
You can’t perform that action at this time.
0 commit comments