2023-11-02 13:31:17 +01:00

23 lines
742 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
CARGO_PROFILE=release
# CARGO_PROFILE=debug
-CARGO_BUILD_ARGS=--$(CARGO_PROFILE)
+CARGO_BUILD_ARGS=--$(CARGO_PROFILE) --target $(RUST_TARGET)
CARGO_BUILD=$(CARGO) build $(CARGO_BUILD_ARGS)
VERSION?=$(shell git describe --dirty=+ 2>/dev/null || echo v0.1-nogit)
@@ -126,7 +126,10 @@
RUST_SRCS=$(shell find rust-src/src rust-src/bch_bindgen/src -type f -iname '*.rs')
rust-src/target/release/libbcachefs_rust.a: $(RUST_SRCS)
$(CARGO_BUILD) --manifest-path rust-src/Cargo.toml
+ if [ -f rust-src/target/*/release/libbcachefs_rust.a ]; then \
+ cp rust-src/target/*/release/libbcachefs_rust.a $@; \
+ fi
tests/test_helper: $(filter ./tests/%.o, $(OBJS))
@echo " [LD] $@"