File tree 3 files changed +7
-12
lines changed
3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ default = ["stack-cache"]
67
67
stack-cache = []
68
68
stack-cache-consistency-check = [" stack-cache" ]
69
69
70
+ [lints .rust .unexpected_cfgs ]
71
+ level = " warn"
72
+ check-cfg = [' cfg(bootstrap)' ]
73
+
70
74
# Be aware that this file is inside a workspace when used via the
71
75
# submodule in the rustc repo. That means there are many cargo features
72
76
# 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> {
713
713
clock : Clock :: new ( config. isolated_op == IsolatedOp :: Allow ) ,
714
714
#[ cfg( unix) ]
715
715
native_lib : config. native_lib . as_ref ( ) . map ( |lib_file_path| {
716
+ let host_triple = rustc_session:: config:: host_tuple ( ) ;
716
717
let target_triple = tcx. sess . opts . target_triple . tuple ( ) ;
717
718
// Check if host target == the session target.
718
- if env ! ( "TARGET" ) != target_triple {
719
+ if host_triple != target_triple {
719
720
panic ! (
720
721
"calling external C functions in linked .so file requires host and target to be the same: host={}, target={}" ,
721
- env! ( "TARGET" ) ,
722
+ host_triple ,
722
723
target_triple,
723
724
) ;
724
725
}
You can’t perform that action at this time.
0 commit comments