Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 63113c8

Browse files
committedAug 15, 2022
unwind: don't build dependency when building for Miri
1 parent 2fbc08e commit 63113c8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎library/unwind/build.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ use std::env;
22

33
fn main() {
44
println!("cargo:rerun-if-changed=build.rs");
5-
let target = env::var("TARGET").expect("TARGET was not set");
5+
println!("cargo:rerun-if-env-changed=CARGO_CFG_MIRI");
6+
7+
if env::var_os("CARGO_CFG_MIRI").is_some() {
8+
// Miri doesn't need the linker flags or a libunwind build.
9+
return;
10+
}
611

12+
let target = env::var("TARGET").expect("TARGET was not set");
713
if target.contains("android") {
814
let build = cc::Build::new();
915

0 commit comments

Comments
 (0)
Failed to load comments.