From: Emilio Pozuelo Monfort Date: Wed, 28 Aug 2024 14:44:23 +0000 (+0200) Subject: use-vendored-libgit X-Git-Tag: archive/raspbian/1.78.0+dfsg1-2_deb12u3+rpi1~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a975189ed0acd052fc4a2afe9afaeb6a133b6587;p=rustc-web.git use-vendored-libgit Use vendored libgit Gbp-Pq: Topic vendor Gbp-Pq: Name use-vendored-libgit.patch --- diff --git a/vendor/libgit2-sys/build.rs b/vendor/libgit2-sys/build.rs index 88fce00d6e..671afdc0dd 100644 --- a/vendor/libgit2-sys/build.rs +++ b/vendor/libgit2-sys/build.rs @@ -49,7 +49,7 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN } // 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; @@ -90,8 +90,8 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN 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"); @@ -104,7 +104,7 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN // 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")) @@ -118,7 +118,8 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN .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"); @@ -238,6 +239,8 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN 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");