From: Jakub Dupak Date: Tue, 27 Feb 2024 23:08:01 +0000 (+0100) Subject: gccrs: borrowck: Build Polonius automatically X-Git-Tag: basepoints/gcc-16~1458 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94f826dccee64927d2aa5ec70a42a28ce3514d95;p=thirdparty%2Fgcc.git gccrs: borrowck: Build Polonius automatically This is minimalistic version to build Polonius with Cargo. gcc/rust/ChangeLog: * Make-lang.in: Build Polonius. Signed-off-by: Jakub Dupak --- diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index 33176df6d7a..795e899f51c 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -264,6 +264,7 @@ rust.srcman: # Clean hooks. rust.mostlyclean: + rm -rf rust/ffi-polonius/release libffi_polonius.a # cd $(srcdir)/rust; rm -f *.o y.tab.h y.tab.c lex.yy.c rust.clean: rust.mostlyclean @@ -487,3 +488,9 @@ rust/%.o: rust/checks/errors/borrowck/%.cc rust/%.o: rust/metadata/%.cc $(COMPILE) $(RUST_CXXFLAGS) $(RUST_INCLUDES) $< $(POSTCOMPILE) + +rust/libffi_polonius.a: \ + rust/checks/errors/borrowck/ffi-polonius/Cargo.toml \ + $(wildcard $(srcdir)/rust/checks/errors/borrowck/ffi-polonius/src/*) + cargo build --manifest-path $(srcdir)/rust/checks/errors/borrowck/ffi-polonius/Cargo.toml --release --target-dir rust/ffi-polonius + cp rust/ffi-polonius/release/libffi_polonius.a rust/libffi_polonius.a \ No newline at end of file