Skip to content

Commit dc6c365

Browse files
committed
don't emit rerun-if-changed when vendoring
1 parent 4a19cd4 commit dc6c365

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openssl-sys/build/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ fn main() {
7979
let target = env::var("TARGET").unwrap();
8080

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

0 commit comments

Comments
 (0)