Help debugging unnecessary rebuilds

The highs-sys crate always requires building twice. To reproduce run:

git clone https://github.com/rust-or/highs-sys
cargo check
cargo check
cargo check

You will see that it will build twice before no longer triggering a rebuild.

Using export CARGO_LOG=cargo::core::compiler::fingerprint=trace I've narrowed it down to the file out/include/highs/HConfig.h being deemed dirty due to stale_mtime, but I'm not sure how to proceed further.

Can anyone more experienced with cargo build-scripts and cmake offer any suggestions?

1 Like