File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ default = ["stack-cache"]
6767stack-cache = []
6868stack-cache-consistency-check = [" stack-cache" ]
6969
70+ [lints .rust .unexpected_cfgs ]
71+ level = " warn"
72+ check-cfg = [' cfg(bootstrap)' ]
73+
7074# Be aware that this file is inside a workspace when used via the
7175# submodule in the rustc repo. That means there are many cargo features
7276# we cannot use, such as profiles.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -713,12 +713,13 @@ impl<'tcx> MiriMachine<'tcx> {
713713 clock : Clock :: new ( config. isolated_op == IsolatedOp :: Allow ) ,
714714 #[ cfg( unix) ]
715715 native_lib : config. native_lib . as_ref ( ) . map ( |lib_file_path| {
716+ let host_triple = rustc_session:: config:: host_tuple ( ) ;
716717 let target_triple = tcx. sess . opts . target_triple . tuple ( ) ;
717718 // Check if host target == the session target.
718- if env ! ( "TARGET" ) != target_triple {
719+ if host_triple != target_triple {
719720 panic ! (
720721 "calling external C functions in linked .so file requires host and target to be the same: host={}, target={}" ,
721- env! ( "TARGET" ) ,
722+ host_triple ,
722723 target_triple,
723724 ) ;
724725 }
You can’t perform that action at this time.
0 commit comments