aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2024-02-28 00:08:01 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-17 16:35:22 +0100
commit94f826dccee64927d2aa5ec70a42a28ce3514d95 (patch)
treebe7edaf8e5ab332ccf7ecb68718ae0b1c06d5d6c /gcc
parent2990a1f4dd255db6bc51906fbd5ba24d3bb39fe0 (diff)
downloadgcc-94f826dccee64927d2aa5ec70a42a28ce3514d95.zip
gcc-94f826dccee64927d2aa5ec70a42a28ce3514d95.tar.gz
gcc-94f826dccee64927d2aa5ec70a42a28ce3514d95.tar.bz2
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 <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 33176df..795e899 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