Skip to content

Commit 9622053

Browse files
Fix thumb build on macOS.
We need to include libc only when we are building neotron-os for macOS, not when we are building the build.rs file itself for macOS.
1 parent 514a28d commit 9622053

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ fn main() {
2323
println!("cargo:rustc-env=OS_VERSION={}", env!("CARGO_PKG_VERSION"));
2424
}
2525

26-
#[cfg(target_os = "macos")]
27-
println!("cargo:rustc-link-lib=c");
26+
if Ok("macos") == env::var("CARGO_CFG_TARGET_OS").as_deref() {
27+
println!("cargo:rustc-link-lib=c");
28+
}
2829
}

0 commit comments

Comments
 (0)