Skip to content

Commit 4d0c0c2

Browse files
author
Ellen Arteca
committed
optional check for TARGET env var
1 parent 3188d07 commit 4d0c0c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shims/foreign_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
370370
// First deal with any external C functions in linked .so file
371371
// (if any SO file is specified, and if the host target == the session target)
372372
if this.machine.external_so_lib.as_ref().is_some()
373-
&& env!("TARGET") == this.tcx.sess.opts.target_triple.to_string()
373+
&& option_env!("TARGET") == Some(&this.tcx.sess.opts.target_triple.to_string())
374374
{
375375
// An Ok(false) here means that the function being called was not exported
376376
// by the specified SO file; we should continue and check if it corresponds to

0 commit comments

Comments
 (0)