Skip to content

Commit

Permalink
Rerun build if RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64 changes
Browse files Browse the repository at this point in the history
Collect the linux_time_bits64 in one place.

(backport <#4242>)
(cherry picked from commit 9a861ed)
  • Loading branch information
snogge authored and tgross35 committed Feb 22, 2025
1 parent 72e5854 commit c5b7465
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ fn main() {
let rustc_dep_of_std = env::var("CARGO_FEATURE_RUSTC_DEP_OF_STD").is_ok();
let libc_ci = env::var("LIBC_CI").is_ok();
let libc_check_cfg = env::var("LIBC_CHECK_CFG").is_ok() || rustc_minor_ver >= 80;
let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok();

// The ABI of libc used by std is backward compatible with FreeBSD 12.
// The ABI of libc from crates.io is backward compatible with FreeBSD 11.
Expand Down Expand Up @@ -82,6 +81,8 @@ fn main() {
_ => (),
}

let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok();
println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64");
if linux_time_bits64 {
set_cfg("linux_time_bits64");
}
Expand Down

0 comments on commit c5b7465

Please sign in to comment.