mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
zkas: Static build test
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -3620,7 +3620,6 @@ version = "0.26.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
|
checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|||||||
14
Makefile
14
Makefile
@@ -6,10 +6,10 @@ PREFIX = $(HOME)/.cargo
|
|||||||
# Cargo binary
|
# Cargo binary
|
||||||
CARGO = cargo +nightly
|
CARGO = cargo +nightly
|
||||||
|
|
||||||
# Optional compile target
|
# Compile target for system binaries
|
||||||
#RUST_TARGET = x86_64-unknown-linux-musl
|
RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2)
|
||||||
# Uncomment this if the above is uncommented
|
# Uncomment when doing musl static builds
|
||||||
#TARGET_PRFX = --target=
|
#RUSTFLAGS = "-C target-feature=+crt-static -C link-self-contained=yes"
|
||||||
|
|
||||||
# Binaries to be built
|
# Binaries to be built
|
||||||
BINS = \
|
BINS = \
|
||||||
@@ -32,7 +32,11 @@ PROOFS_BIN = $(PROOFS_SRC:=.bin)
|
|||||||
all: $(BINS)
|
all: $(BINS)
|
||||||
|
|
||||||
zkas:
|
zkas:
|
||||||
$(MAKE) -C bin/zkas
|
$(MAKE) -C bin/zkas \
|
||||||
|
PREFIX="$(PREFIX)" \
|
||||||
|
CARGO="$(CARGO)" \
|
||||||
|
RUST_TARGET="$(RUST_TARGET)" \
|
||||||
|
RUSTFLAGS="$(RUSTFLAGS)"
|
||||||
|
|
||||||
$(PROOFS_BIN): zkas $(PROOFS_SRC)
|
$(PROOFS_BIN): zkas $(PROOFS_SRC)
|
||||||
./zkas $(basename $@) -o $@
|
./zkas $(basename $@) -o $@
|
||||||
|
|||||||
@@ -6,19 +6,22 @@ PREFIX = $(HOME)/.cargo
|
|||||||
# Cargo binary
|
# Cargo binary
|
||||||
CARGO = cargo +nightly
|
CARGO = cargo +nightly
|
||||||
|
|
||||||
|
# Compile target
|
||||||
|
RUST_TARGET = $(shell rustc -Vv | grep '^host: ' | cut -d' ' -f2)
|
||||||
|
|
||||||
SRC = \
|
SRC = \
|
||||||
Cargo.toml \
|
Cargo.toml \
|
||||||
../../Cargo.toml \
|
../../Cargo.toml \
|
||||||
$(shell find src -type f) \
|
$(shell find src -type f -name '*.rs') \
|
||||||
$(shell find ../../src/serial -type f) \
|
$(shell find ../../src/serial -type f -name '*.rs') \
|
||||||
$(shell find ../../src/zkas -type f)
|
$(shell find ../../src/zkas -type f -name '*.rs')
|
||||||
|
|
||||||
BIN = ../../zkas
|
BIN = ../../zkas
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
|
|
||||||
$(BIN): $(SRC)
|
$(BIN): $(SRC)
|
||||||
$(CARGO) build $(TARGET_PRFX)$(RUST_TARGET) --release --package zkas
|
RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) build --target=$(RUST_TARGET) --release --package zkas
|
||||||
cp -f ../../target/$(RUST_TARGET)/release/zkas $@
|
cp -f ../../target/$(RUST_TARGET)/release/zkas $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user