rename size-optimized to size_optimized
This commit is contained in:
parent
c7d40b828b
commit
a4699b9bc8
4 changed files with 9 additions and 9 deletions
|
@ -11,8 +11,8 @@ ifeq (,$(filter dynamic static,$(_link_type)))
|
|||
endif
|
||||
|
||||
_profile := $(if $(PROFILE),$(PROFILE),release)
|
||||
ifeq (,$(filter release debug size-optimized,$(_profile)))
|
||||
_profile := $(error "PROFILE has to be set to one of: debug, release, size-optimized")
|
||||
ifeq (,$(filter release debug size_optimized,$(_profile)))
|
||||
_profile := $(error "PROFILE has to be set to one of: debug, release, size_optimized")
|
||||
endif
|
||||
|
||||
ARCH ?= $(shell uname -m)
|
||||
|
@ -43,7 +43,7 @@ _rust_cli_profile := $(if $(filter $(_profile),debug),dev,$(_profile))
|
|||
STRIPFLAGS += -s --strip-unneeded -R .comment -R .gnu.version -R .note -R .note.gnu.build-id -R .note.ABI-tag
|
||||
STATIC_LINK_LIBS += -lservicepoint_binding_c
|
||||
|
||||
size-optimized_CARGOFLAGS += -Zbuild-std="core,std,alloc,proc_macro,panic_abort" \
|
||||
size_optimized_CARGOFLAGS += -Zbuild-std="core,std,alloc,proc_macro,panic_abort" \
|
||||
-Zbuild-std-features="panic_immediate_abort"
|
||||
CARGOFLAGS += --manifest-path=$(REPO_ROOT)/Cargo.toml \
|
||||
--profile=$(_rust_cli_profile) \
|
||||
|
@ -55,7 +55,7 @@ CARGOFLAGS += --manifest-path=$(REPO_ROOT)/Cargo.toml \
|
|||
|
||||
CFLAGS += -Wall -Wextra -pedantic -fwhole-program -fPIE -pie
|
||||
_no_debug_cflags := -ffunction-sections -fdata-sections -Wl,--gc-sections
|
||||
size-optimized_CFLAGS += -Oz \
|
||||
size_optimized_CFLAGS += -Oz \
|
||||
-fwrapv -fomit-frame-pointer -fno-stack-protector\
|
||||
-fno-unroll-loops \
|
||||
-fno-unwind-tables -fno-asynchronous-unwind-tables \
|
||||
|
@ -74,7 +74,7 @@ debug_CFLAGS += -Og
|
|||
static_CFLAGS += -static $(STATIC_LINK_LIBS)
|
||||
dynamic_CFLAGS += -Wl,-Bstatic $(STATIC_LINK_LIBS) -Wl,-Bdynamic
|
||||
|
||||
size-optimized_RUSTFLAGS += -Zlocation-detail=none \
|
||||
size_optimized_RUSTFLAGS += -Zlocation-detail=none \
|
||||
-Zfmt-debug=none \
|
||||
-C link-arg=-z,norelro \
|
||||
-C panic=abort
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue