aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2024-02-28 00:08:01 +0100
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2024-05-06 12:23:49 +0000
commitab8b4cc38806e1a7190a7426ce073951752d1a60 (patch)
tree6a0f5760fd7bc50f13767fd1cce28ce7d74a4f5c /gcc
parent509c286cb0665720550cb88a2628a98d35f1b37e (diff)
downloadgcc-ab8b4cc38806e1a7190a7426ce073951752d1a60.zip
gcc-ab8b4cc38806e1a7190a7426ce073951752d1a60.tar.gz
gcc-ab8b4cc38806e1a7190a7426ce073951752d1a60.tar.bz2
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 <dev@jakubdupak.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/Make-lang.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 7466337..3275015 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