Skip to content

Commit

Permalink
Merge pull request #4192 from bjorn3/no_build_script
Browse files Browse the repository at this point in the history
Remove the build script for miri
  • Loading branch information
RalfJung authored Feb 14, 2025
2 parents 87ffe65 + e9507b7 commit b4998e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ default = ["stack-cache"]
stack-cache = []
stack-cache-consistency-check = ["stack-cache"]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(bootstrap)']

# Be aware that this file is inside a workspace when used via the
# submodule in the rustc repo. That means there are many cargo features
# we cannot use, such as profiles.
10 changes: 0 additions & 10 deletions build.rs

This file was deleted.

5 changes: 3 additions & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,13 @@ impl<'tcx> MiriMachine<'tcx> {
clock: Clock::new(config.isolated_op == IsolatedOp::Allow),
#[cfg(unix)]
native_lib: config.native_lib.as_ref().map(|lib_file_path| {
let host_triple = rustc_session::config::host_tuple();
let target_triple = tcx.sess.opts.target_triple.tuple();
// Check if host target == the session target.
if env!("TARGET") != target_triple {
if host_triple != target_triple {
panic!(
"calling external C functions in linked .so file requires host and target to be the same: host={}, target={}",
env!("TARGET"),
host_triple,
target_triple,
);
}
Expand Down

0 comments on commit b4998e8

Please sign in to comment.