}
// To use zlib-ng in zlib-compat mode, we have to build libgit2 ourselves.
- let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
+ let try_to_use_system_libgit2 = false;
if try_to_use_system_libgit2 && try_system_libgit2().is_ok() {
// using system libgit2 has worked
return;
add_c_files(&mut cfg, "libgit2/src/libgit2/streams");
// Always use bundled http-parser for now
- cfg.include("libgit2/deps/http-parser")
- .file("libgit2/deps/http-parser/http_parser.c");
+ //cfg.include("libgit2/deps/http-parser")
+ // .file("libgit2/deps/http-parser/http_parser.c");
// external/system xdiff is not yet supported
cfg.include("libgit2/deps/xdiff");
// reasons, just define on the command-line for everything. Perhaps there
// is some way with cc to have different instructions per-file?
cfg.define("GIT_REGEX_BUILTIN", "1")
- .include("libgit2/deps/pcre")
+ //.include("libgit2/deps/pcre")
.define("HAVE_STDINT_H", Some("1"))
.define("HAVE_MEMMOVE", Some("1"))
.define("NO_RECURSE", Some("1"))
.define("MAX_NAME_COUNT", Some("10000"));
// "no symbols" warning on pcre_string_utils.c is because it is only used
// when when COMPILE_PCRE8 is not defined, which is the default.
- add_c_files(&mut cfg, "libgit2/deps/pcre");
+ //add_c_files(&mut cfg, "libgit2/deps/pcre");
+ println!("cargo:rustc-link-lib=pcre");
cfg.file("libgit2/src/util/allocators/failalloc.c");
cfg.file("libgit2/src/util/allocators/stdalloc.c");
println!("cargo:root={}", dst.display());
+ println!("cargo:rustc-link-lib=http_parser");
+
if target.contains("windows") {
println!("cargo:rustc-link-lib=winhttp");
println!("cargo:rustc-link-lib=rpcrt4");