]> git.ipfire.org Git - thirdparty/git.git/commitdiff
SQUASH??? downgrade build.rs syntax
authorJunio C Hamano <gitster@pobox.com>
Wed, 29 Oct 2025 20:10:19 +0000 (13:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Oct 2025 20:10:19 +0000 (13:10 -0700)
As the build with "make WITH_RUST=YesPlease" dies like so

    ...
    AR libgit.a
    CARGO target/release/libgitcore.a
error: the `cargo::` syntax for build script output instructions was added in \
    Rust 1.77.0, but the minimum supported Rust version of `gitcore v0.1.0 \
    (/home/gitster/w/git.build)` is 1.49.0.
Switch to the old `cargo:rustc-link-search=.` syntax (note the single colon).
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-\
    the-build-script for more information about build script outputs.
gmake: *** [Makefile:2964: target/release/libgitcore.a] Error 101

work it around by downgrading the syntax as the error messages suggests.

build.rs

index 136d58c35a70c1b6e52c9a078f05cfb278d48083..3228367b5d1fc27523160e710e75a5a6749f21fc 100644 (file)
--- a/build.rs
+++ b/build.rs
 // with this program; if not, see <https://www.gnu.org/licenses/>.
 
 fn main() {
-    println!("cargo::rustc-link-search=.");
-    println!("cargo::rustc-link-search=reftable");
-    println!("cargo::rustc-link-search=xdiff");
-    println!("cargo::rustc-link-lib=git");
-    println!("cargo::rustc-link-lib=reftable");
-    println!("cargo::rustc-link-lib=z");
-    println!("cargo::rustc-link-lib=xdiff");
+    println!("cargo:rustc-link-search=.");
+    println!("cargo:rustc-link-search=reftable");
+    println!("cargo:rustc-link-search=xdiff");
+    println!("cargo:rustc-link-lib=git");
+    println!("cargo:rustc-link-lib=reftable");
+    println!("cargo:rustc-link-lib=z");
+    println!("cargo:rustc-link-lib=xdiff");
 }