features, cargo fmt
This commit is contained in:
parent
baa450b2f7
commit
10ebccdf47
9 changed files with 25 additions and 15 deletions
|
@ -3,6 +3,7 @@ CARGO := rustup run nightly cargo
|
|||
|
||||
TARGET := x86_64-unknown-linux-musl
|
||||
PROFILE := size-optimized
|
||||
FEATURES := protocol_udp
|
||||
|
||||
THIS_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
REPO_ROOT := $(THIS_DIR)/..
|
||||
|
@ -22,6 +23,7 @@ RUSTFLAGS := -Zlocation-detail=none \
|
|||
CARGOFLAGS := --manifest-path=$(REPO_ROOT)/Cargo.toml \
|
||||
--profile=$(PROFILE) \
|
||||
--no-default-features \
|
||||
--features=$(FEATURES) \
|
||||
--target=$(TARGET) \
|
||||
-Zbuild-std="core,std,alloc,proc_macro,panic_abort" \
|
||||
-Zbuild-std-features="panic_immediate_abort" \
|
||||
|
@ -53,7 +55,7 @@ _programs := $(basename $(_c_src))
|
|||
_bins := $(addprefix out/, $(_programs))
|
||||
_unstripped_bins := $(addsuffix _unstripped, $(_bins))
|
||||
_run_programs := $(addprefix run_, $(_programs))
|
||||
_rs_src := $(wildcard ../src/**.rs) ../Cargo.lock
|
||||
_rs_src := $(wildcard ../src/**.rs) ../Cargo.lock ../Cargo.toml ../cbindgen.toml
|
||||
|
||||
all: $(_bins)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue