Skip to content

Commit

Permalink
Merge pull request #2177 from reaperhulk/fix-rebuild
Browse files Browse the repository at this point in the history
don't emit rerun-if-changed when vendoring
  • Loading branch information
alex authored Feb 20, 2024
2 parents 4a19cd4 + dc6c365 commit ada168b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openssl-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ fn main() {
let target = env::var("TARGET").unwrap();

let (lib_dirs, include_dir) = find_openssl(&target);
// rerun-if-changed causes openssl-sys to rebuild if the openssl include
// dir has changed since the last build. However, this causes a rebuild
// every time when vendoring so we disable it.
#[cfg(not(feature = "vendored"))]
if let Some(printable_include) = include_dir.join("openssl").to_str() {
println!("cargo:rerun-if-changed={}", printable_include);
}
Expand Down

0 comments on commit ada168b

Please sign in to comment.