https://gcc.gnu.org/g:ab8b4cc38806e1a7190a7426ce073951752d1a60

commit ab8b4cc38806e1a7190a7426ce073951752d1a60
Author: Jakub Dupak <d...@jakubdupak.com>
Date:   Wed Feb 28 00:08:01 2024 +0100

    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 <d...@jakubdupak.com>

Diff:
---
 gcc/rust/Make-lang.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 74663379487d..3275015b0466 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -266,6 +266,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

Reply via email to