Rust · 431 bytes Raw Blame History
1 fn main() {
2 // Explicitly link against libgit2, libssh2, and their dependencies
3 // Use link-arg to append to the END of the linker command line
4 // This ensures the libraries come AFTER the Rust code that needs them
5 // Order matters: libgit2 depends on libssh2, both depend on zlib
6 println!("cargo:rustc-link-arg=-lgit2");
7 println!("cargo:rustc-link-arg=-lssh2");
8 println!("cargo:rustc-link-arg=-lz");
9 }
10